diff --git a/scripts/webpack/webpack-calling.prod.babel.js b/scripts/webpack/webpack-calling.prod.babel.js index aed9420c9..86384f9a1 100644 --- a/scripts/webpack/webpack-calling.prod.babel.js +++ b/scripts/webpack/webpack-calling.prod.babel.js @@ -50,7 +50,7 @@ if (fs.existsSync('./src/index.html')) { ); } -const publicPath = process.env.BUILD_PUBLIC_PATH; +const publicPath = process.env.BUILD_PUBLIC_PATH || '/'; // env config object from command line: https://webpack.js.org/guides/environment-variables/ module.exports = (env) => webpackBaseConfig({ diff --git a/scripts/webpack/webpack.prod.babel.js b/scripts/webpack/webpack.prod.babel.js index 1858d4c22..96fc4efdb 100644 --- a/scripts/webpack/webpack.prod.babel.js +++ b/scripts/webpack/webpack.prod.babel.js @@ -49,7 +49,7 @@ if (fs.existsSync('./src/index.html')) { ); } -const publicPath = process.env.BUILD_PUBLIC_PATH; +const publicPath = process.env.BUILD_PUBLIC_PATH || '/'; // env config object from command line: https://webpack.js.org/guides/environment-variables/ module.exports = (env) => webpackBaseConfig({