Skip to content

Commit

Permalink
feat(webpack): configure publicPath via ASSET_BASE_URL env var (apach…
Browse files Browse the repository at this point in the history
  • Loading branch information
nytai authored and cccs-RyanS committed Dec 17, 2021
1 parent 0ffec5b commit 4fe915c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset-frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ const {
} = parsedArgs;
const isDevMode = mode !== 'production';
const isDevServer = process.argv[1].includes('webpack-dev-server');
const ASSET_BASE_URL = process.env.ASSET_BASE_URL || '';

const output = {
path: BUILD_DIR,
publicPath: '/static/assets/', // necessary for lazy-loaded chunks
publicPath: `${ASSET_BASE_URL}/static/assets/`,
};
if (isDevMode) {
output.filename = '[name].[hash:8].entry.js';
Expand Down

0 comments on commit 4fe915c

Please sign in to comment.