Last active
September 16, 2020 17:22
-
-
Save arijitMondal/6234f5ce71970132da012b4a40c4f996 to your computer and use it in GitHub Desktop.
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 { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') | |
module.exports = { | |
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => { | |
if (ANALYZE) { | |
config.plugins.push( | |
new BundleAnalyzerPlugin({ | |
analyzerMode: 'server', | |
analyzerPort: isServer ? 8888 : 8889, | |
openAnalyzer: true, | |
}) | |
) | |
} | |
return config | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment