only add hash to Webpack bundle in production mode
This commit is contained in:
parent
b6d423a50d
commit
93e3455806
1 changed files with 2 additions and 1 deletions
|
@ -5,7 +5,7 @@ var config = {
|
||||||
entry: "./static/js/main.ts",
|
entry: "./static/js/main.ts",
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, "static/build"),
|
path: path.resolve(__dirname, "static/build"),
|
||||||
filename: 'quay-frontend-[hash].js'
|
filename: 'quay-frontend.js'
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: [".ts", ".tsx", ".js", ".scss"],
|
extensions: [".ts", ".tsx", ".js", ".scss"],
|
||||||
|
@ -64,6 +64,7 @@ if (process.env.NODE_ENV === 'production') {
|
||||||
mangle: false
|
mangle: false
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
config.output.filename = 'quay-frontend-[hash].js';
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
|
|
Reference in a new issue