-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Closed
Description
Would produce .next/stats.json and pass the profile flags to webpack
I tried this in next.config.js:
const StatsPlugin = require("stats-webpack-plugin")
module.exports = {
webpack (cfg) {
if (process.env.WEBPACK_STATS) {
cfg.profile = true
cfg.plugins.push(
new StatsPlugin('stats.json', {
timings: true,
assets: true,
chunks: true,
chunkModules: true,
modules: true,
children: true,
cached: true,
reasons: true
})
)
}
return cfg
}
}But I think we need to handle it on next since it only contained main.js and common.js, and not any of the generated pages.
Ideally I would like the webpack plugin to work out of the box though
iaincollins, khankuan, pie6k and geovanisouza92
Metadata
Metadata
Assignees
Labels
No labels