Skip to content

Commit 7e75c8e

Browse files
Fix for homepage="."; make static file urls relative ('../..').
1 parent 60c3a98 commit 7e75c8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-scripts/config/webpack.config.prod.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ module.exports = {
450450
exclude: [/\.(js|mjs|jsx)$/, /\.html$/, /\.json$/],
451451
options: {
452452
name: 'static/media/[name].[hash:8].[ext]',
453+
publicPath: publicPath === './' ? '../../' : publicPath,
453454
},
454455
},
455456
// ** STOP ** Are you adding a new loader?

0 commit comments

Comments
 (0)