fix: Use STATIC_URL in development server (#980)
`publicPath` was not set to STATIC_URL when making use of development server. This prevented properly put dashboard under subdir in some cases in development mode.
This commit is contained in:
parent
153b52dc0f
commit
af01ebe4dc
1 changed files with 2 additions and 2 deletions
|
@ -44,8 +44,8 @@ module.exports = (env, argv) => {
|
||||||
throw new Error("Environment variable API_URI not set");
|
throw new Error("Environment variable API_URI not set");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!devMode) {
|
|
||||||
const publicPath = process.env.STATIC_URL || "/";
|
const publicPath = process.env.STATIC_URL || "/";
|
||||||
|
if (!devMode) {
|
||||||
output = {
|
output = {
|
||||||
chunkFilename: "[name].[chunkhash].js",
|
chunkFilename: "[name].[chunkhash].js",
|
||||||
filename: "[name].[chunkhash].js",
|
filename: "[name].[chunkhash].js",
|
||||||
|
@ -58,7 +58,7 @@ module.exports = (env, argv) => {
|
||||||
chunkFilename: "[name].js",
|
chunkFilename: "[name].js",
|
||||||
filename: "[name].js",
|
filename: "[name].js",
|
||||||
path: resolve(dashboardBuildPath),
|
path: resolve(dashboardBuildPath),
|
||||||
publicPath: "/"
|
publicPath
|
||||||
};
|
};
|
||||||
fileLoaderPath = "file-loader?name=[name].[ext]";
|
fileLoaderPath = "file-loader?name=[name].[ext]";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue