Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Webpack: chunkhash in production, hash in development
const PRODUCTION = process.env.NODE_ENV === 'production';
const HASH_MODE = PRODUCTION ? 'chunkhash' : 'hash';
module.exports = {
output: {
filename: `[name].[${HASH_MODE}].js`,
chunkFilename: `[name].[${HASH_MODE}].js`,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.