-
I am successfully using this package with nextjs, everything works. But now i like to analyse the bundle sizes and the recommended package "@next/bundle-analyzer" advises to wrap the config with their Object which at the otherhand obstructs this packge. Is there a way to use them both together in the same next.config.js file ??? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Take a look at next-compose-plugins |
Beta Was this translation helpful? Give feedback.
-
Yes, we are using const hasBundleAnalyzer = withBundleAnalyzer({
analyzeServer: ['server', 'both'].includes(process.env.BUNDLE_ANALYZE),
analyzeBrowser: ['browser', 'both'].includes(process.env.BUNDLE_ANALYZE),
bundleAnalyzerConfig: {
server: {
analyzerMode: 'static',
reportFilename: 'server.html',
},
browser: {
analyzerMode: 'static',
reportFilename: 'client.html',
},
},
...config,
})
module.exports = nextTranslate(withPreact(hasBundleAnalyzer)) |
Beta Was this translation helpful? Give feedback.
Yes, we are using
@next/bundle-analyzer
withnext-translate
andnext-plugin-preact
without any problem.