Closed hboylan closed 2 years ago
Thank you @hboylan, fixed! 🙇
Looks like you missed the closing curly brace :)
const { StatsWriterPlugin } = require('webpack-stats-plugin')
module.exports = {
webpack: (config, options) => {
const { dev, isServer } = options;
// Output webpack stats JSON file only for client-side/production build
if (!dev && !isServer) {
config.plugins.push(
new StatsWriterPlugin({
filename: '../webpack-stats.json',
stats: {
assets: true,
chunks: true,
modules: true
}
) // <-- should be })
);
}
return config;
}
};
thanks for noticing it @jessetan, it is fixed now 🙇
Just a small typo from copy-pasting the
next.config.js
webpack config.https://relative-ci.com/documentation/guides/webpack-stats/next.js