only add hash to Webpack bundle in production mode

This commit is contained in:
alecmerdler 2017-06-13 13:07:46 -07:00
parent b6d423a50d
commit 93e3455806

View file

@ -5,7 +5,7 @@ var config = {
entry: "./static/js/main.ts",
output: {
path: path.resolve(__dirname, "static/build"),
filename: 'quay-frontend-[hash].js'
filename: 'quay-frontend.js'
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".scss"],
@ -64,6 +64,7 @@ if (process.env.NODE_ENV === 'production') {
mangle: false
})
);
config.output.filename = 'quay-frontend-[hash].js';
}
module.exports = config;