initial commit
This commit is contained in:
20
next.config.js
Normal file
20
next.config.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const withSass = require('@zeit/next-sass');
|
||||
const { ANALYZE } = process.env
|
||||
let AnalyzerPlugin;
|
||||
if(ANALYZE) {
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
AnalyzerPlugin = BundleAnalyzerPlugin;
|
||||
}
|
||||
module.exports = withSass({
|
||||
poweredByHeader: false,
|
||||
webpack: function (config, { isServer }) {
|
||||
if (ANALYZE) {
|
||||
config.plugins.push(new AnalyzerPlugin({
|
||||
analyzerMode: 'server',
|
||||
analyzerPort: isServer ? 8888 : 8889,
|
||||
openAnalyzer: true
|
||||
}))
|
||||
}
|
||||
return config
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user