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:
Sebastian Kalinowski 2021-02-22 12:47:57 +01:00 committed by GitHub
parent 153b52dc0f
commit af01ebe4dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,8 +44,8 @@ module.exports = (env, argv) => {
throw new Error("Environment variable API_URI not set");
}
const publicPath = process.env.STATIC_URL || "/";
if (!devMode) {
const publicPath = process.env.STATIC_URL || "/";
output = {
chunkFilename: "[name].[chunkhash].js",
filename: "[name].[chunkhash].js",
@ -58,7 +58,7 @@ module.exports = (env, argv) => {
chunkFilename: "[name].js",
filename: "[name].js",
path: resolve(dashboardBuildPath),
publicPath: "/"
publicPath
};
fileLoaderPath = "file-loader?name=[name].[ext]";
}