Skip to content

Commit 49fdca0

Browse files
authored
Merge pull request #249 from halfzebra/fix-public-url
fix(Webpack Config): Fixed PUBLIC_URL token substitution
2 parents 8e35f78 + 9a46545 commit 49fdca0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config/webpack.config.dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ module.exports = {
122122
loader: require.resolve('string-replace-loader'),
123123
query: {
124124
search: '%PUBLIC_URL%',
125-
replace: publicUrl
125+
replace: publicUrl,
126+
flags: 'g'
126127
}
127128
},
128129
{

config/webpack.config.prod.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ module.exports = {
142142
loader: require.resolve('string-replace-loader'),
143143
query: {
144144
search: '%PUBLIC_URL%',
145-
replace: publicUrl
145+
replace: publicUrl,
146+
flags: 'g'
146147
}
147148
},
148149
{

0 commit comments

Comments
 (0)