updated format and lint scripts and applied them

This commit is contained in:
JJ Kasper
2018-06-01 16:52:12 -05:00
parent 53ac8a6793
commit 017a9993ee
58 changed files with 1711 additions and 1568 deletions

View File

@@ -1,20 +1,22 @@
const withSass = require('@zeit/next-sass');
const withSass = require('@zeit/next-sass')
const { ANALYZE } = process.env
let AnalyzerPlugin;
if(ANALYZE) {
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
AnalyzerPlugin = BundleAnalyzerPlugin;
let AnalyzerPlugin
if (ANALYZE) {
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
AnalyzerPlugin = BundleAnalyzerPlugin
}
module.exports = withSass({
poweredByHeader: false,
webpack: function (config, { isServer }) {
webpack: function(config, { isServer }) {
if (ANALYZE) {
config.plugins.push(new AnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: isServer ? 8888 : 8889,
openAnalyzer: true
}))
config.plugins.push(
new AnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: isServer ? 8888 : 8889,
openAnalyzer: true,
})
)
}
return config
}
});
},
})