mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Closes PACK-4263 This: - Adds support for using `config.turbopack` for Turbopack. The accepted value for this option is identical to the previous experimental one without the deprecated field `loaders`. - Deprecates `config.experimental.turbo`. Warns on its use, but will continue to accept it, merging it with `config.turbopack` while preferring fields on `config.turbopack`. - also see https://github.com/vercel/next.js/pull/77850#pullrequestreview-2749738760 Test Plan: - [x] Convert use of `config.experimental.turbo` in tests to `config.turbopack` - [x] Automated test for accepting the experimental option for compatibility, as well as the config merging
20 lines
363 B
JavaScript
20 lines
363 B
JavaScript
module.exports = {
|
|
turbopack: {
|
|
resolveAlias: {
|
|
'preact/compat': 'react',
|
|
},
|
|
},
|
|
serverExternalPackages: [
|
|
'app-esm-package1',
|
|
'app-esm-package2',
|
|
'app-cjs-esm-package',
|
|
],
|
|
webpack(config, { isServer }) {
|
|
config.resolve.alias = {
|
|
...config.resolve.alias,
|
|
'preact/compat': 'react',
|
|
}
|
|
return config
|
|
},
|
|
}
|