Created
February 23, 2017 18:06
-
-
Save ryanwilsonperkin/350164cb36c31eb53499af453b123a71 to your computer and use it in GitHub Desktop.
Webpack: chunkhash in production, hash in development
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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