diff --git a/config/webpack/config.base.js b/config/webpack/config.base.js index dd33917b26..685b2e9f4f 100644 --- a/config/webpack/config.base.js +++ b/config/webpack/config.base.js @@ -9,6 +9,7 @@ const path = require("path"); if (!process.env.API_URI) { throw new Error("Environment variable API_URI not set"); } +const STATIC_URL = process.env.STATIC_URL || '/'; module.exports = ({ sourceDir, distDir }) => ({ devtool: "source-map", @@ -84,7 +85,7 @@ module.exports = ({ sourceDir, distDir }) => ({ }, output: { path: distDir, - publicPath: "/", + publicPath: STATIC_URL, }, plugins: [ new CleanWebpackPlugin({ diff --git a/config/webpack/config.prod.js b/config/webpack/config.prod.js index db2c67bab7..f7885f03ca 100644 --- a/config/webpack/config.prod.js +++ b/config/webpack/config.prod.js @@ -1,8 +1,9 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + module.exports = ({ sourceDir, distDir }) => ({ output: { - filename: "js/[name].[contenthash].js" + filename: "js/[name].[contenthash].js", }, module: { rules: [