mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This has been causing a lot of confusion when contributors have been debugging tree shaking, eg. https://github.com/vercel/next.js/issues/95698 and the linked issues. Turbopack's standard tree-shaking features are controlled through the `turbopackRemoveUnusedExports` and `turbopackRemoveUnusedImports` options which default to true.
24 lines
456 B
JavaScript
24 lines
456 B
JavaScript
// CommonJS configuration with variable declaration first
|
|
const config = {
|
|
experimental: {
|
|
serverActions: true,
|
|
typedRoutes: false,
|
|
turbopackMinify: true,
|
|
turbopackModuleFragments: false,
|
|
turbopackSourceMaps: true
|
|
},
|
|
|
|
images: {
|
|
formats: ['image/avif', 'image/webp']
|
|
},
|
|
|
|
turbopack: {
|
|
resolveAlias: {
|
|
underscore: 'lodash',
|
|
mocha: { browser: 'mocha/browser-entry.js' },
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = config;
|