Skip to content

Commit a405787

Browse files
fix(build): fix-public-path-issue
1 parent 56a4aa4 commit a405787

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/webpack/webpack-calling.prod.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if (fs.existsSync('./src/index.html')) {
5050
);
5151
}
5252

53-
const publicPath = process.env.BUILD_PUBLIC_PATH;
53+
const publicPath = process.env.BUILD_PUBLIC_PATH || '/';
5454

5555
// env config object from command line: https://webpack.js.org/guides/environment-variables/
5656
module.exports = (env) => webpackBaseConfig({

scripts/webpack/webpack.prod.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if (fs.existsSync('./src/index.html')) {
4949
);
5050
}
5151

52-
const publicPath = process.env.BUILD_PUBLIC_PATH;
52+
const publicPath = process.env.BUILD_PUBLIC_PATH || '/';
5353

5454
// env config object from command line: https://webpack.js.org/guides/environment-variables/
5555
module.exports = (env) => webpackBaseConfig({

0 commit comments

Comments
 (0)