Skip to content

Commit

Permalink
Add extra profiling app (#10568)
Browse files Browse the repository at this point in the history
Just another app that I’ve been using for analysis
  • Loading branch information
timneutkens authored Feb 18, 2020
1 parent 88b1fe5 commit 162f11c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/integration/bundle-size-profiling/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
experimental: {
polyfillsOptimization: true,
},
webpack(config, options) {
if (!options.isServer) {
config.profile = true
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
config.plugins.push(
new BundleAnalyzerPlugin({
generateStatsFile: true,
analyzerMode: 'static',
reportFilename: options.isServer
? '../analyze/server.html'
: './analyze/client.html',
})
)
}

return config
},
}
1 change: 1 addition & 0 deletions test/integration/bundle-size-profiling/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default () => 'Hello World'

0 comments on commit 162f11c

Please sign in to comment.