Files
Benjamin WoodruffandGitHub 15a056703a Turbopack: Remove undocumented legacy syntax for built-in conditions (e.g. foreign, browser) (#83068)
- https://github.com/vercel/next.js/pull/82857 provides a better way to do this that we intend to document.
- This syntax was never documented (outside of the types and tests). You wouldn't be able to figure out the built-in conditions without digging through the Turbopack source code.
2025-08-29 09:32:56 -07:00

41 lines
937 B
JavaScript

/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
turbopack: {
rules: {
'*.test-file.js': [
{
condition: { all: ['browser', 'foreign'] },
loaders: [
{
loader: require.resolve('./test-file-loader.js'),
options: { browser: true, foreign: true },
},
],
},
{
condition: { all: ['browser', { not: 'foreign' }] },
loaders: [
{
loader: require.resolve('./test-file-loader.js'),
options: { browser: true },
},
],
},
{
condition: { not: { any: ['browser', 'foreign'] } },
loaders: [
{
loader: require.resolve('./test-file-loader.js'),
options: { default: true },
},
],
},
],
},
},
}
module.exports = nextConfig