Skip to content

Instantly share code, notes, and snippets.

@ezekielchentnik
Created September 2, 2016 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezekielchentnik/aac168e5ff4b3287da3a69289b22e53b to your computer and use it in GitHub Desktop.
Save ezekielchentnik/aac168e5ff4b3287da3a69289b22e53b to your computer and use it in GitHub Desktop.
import IS_DEV from '../src/server/utils/isDev';
const hash = IS_DEV ? '[name]' : '[name]-[chunkhash]';
new webpack.DefinePlugin({
'IS_BROWSER': true,
'IS_DEV': IS_DEV,
'process.env.NODE_ENV': JSON.stringify(IS_DEV ? 'development' : 'production')
}),
output: {
path: path.join(root, '/build/assets'),
publicPath,
filename: hash + '.js',
chunkFilename: hash + '.js'
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment