mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
webpack: Use filenames based on hashes.
This should avoid us creating duplicate webpack bundles every time we do a deployment, even if none of the files in the bundles themselves have changed at all.
This commit is contained in:
@@ -119,7 +119,7 @@ export default (env?: string) : webpack.Configuration => {
|
|||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: resolve(__dirname, '../static/webpack-bundles'),
|
path: resolve(__dirname, '../static/webpack-bundles'),
|
||||||
filename: production ? '[name]-[hash].js' : '[name].js',
|
filename: production ? '[name]-[chunkhash].js' : '[name].js',
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: [".tsx", ".ts", ".js", ".json", ".scss", ".css"],
|
extensions: [".tsx", ".ts", ".js", ".json", ".scss", ".css"],
|
||||||
@@ -145,7 +145,7 @@ export default (env?: string) : webpack.Configuration => {
|
|||||||
}
|
}
|
||||||
return '[name].[contenthash].css';
|
return '[name].[contenthash].css';
|
||||||
},
|
},
|
||||||
chunkFilename: "[id].css"
|
chunkFilename: "[chunkhash].css"
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
@@ -162,7 +162,7 @@ export default (env?: string) : webpack.Configuration => {
|
|||||||
// Extract CSS from files
|
// Extract CSS from files
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: "[name].css",
|
filename: "[name].css",
|
||||||
chunkFilename: "[id].css"
|
chunkFilename: "[chunkhash].css"
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user