fix: valid config.json + content-hashed bundle (cache-bust)
- BuildConfig.sh: ${DEBUG:false} -> ${DEBUG:-false} and normalize to
true/false. The old syntax produced empty -> invalid config.json
("DEBUG": }) when DEBUG was unset, breaking the whole frontend.
- webpack: output [name].[contenthash].js so index.html references a
unique bundle URL each build; eliminates stale CDN/browser bundle
after deploys (no manual cache purge needed).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,11 @@ module.exports = {
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname, './dist'),
|
||||
filename: 'bundle.js',
|
||||
// Content-hashed filename: index.html (injected by HtmlWebpackPlugin,
|
||||
// and not edge-cached) points at a unique URL each build, so a new
|
||||
// deploy is picked up immediately — no stale CDN/browser bundle.
|
||||
filename: '[name].[contenthash].js',
|
||||
chunkFilename: '[name].[contenthash].js',
|
||||
publicPath: '/',
|
||||
clean: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user