Unverified Commit d2b8fb79 authored by lauren's avatar lauren Committed by GitHub

[cna] Add `reactCompiler` option (#82251)

Co-authored-by: 's avatarSebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
parent b90559cd
...@@ -42,6 +42,7 @@ export async function createApp({ ...@@ -42,6 +42,7 @@ export async function createApp({
turbopack, turbopack,
rspack, rspack,
disableGit, disableGit,
reactCompiler,
}: { }: {
appPath: string appPath: string
packageManager: PackageManager packageManager: PackageManager
...@@ -60,6 +61,7 @@ export async function createApp({ ...@@ -60,6 +61,7 @@ export async function createApp({
turbopack: boolean turbopack: boolean
rspack: boolean rspack: boolean
disableGit?: boolean disableGit?: boolean
reactCompiler: boolean
}): Promise<void> { }): Promise<void> {
let repoInfo: RepoInfo | undefined let repoInfo: RepoInfo | undefined
const mode: TemplateMode = typescript ? 'ts' : 'js' const mode: TemplateMode = typescript ? 'ts' : 'js'
...@@ -252,6 +254,7 @@ export async function createApp({ ...@@ -252,6 +254,7 @@ export async function createApp({
skipInstall, skipInstall,
turbopack, turbopack,
rspack, rspack,
reactCompiler,
}) })
} }
......
...@@ -49,6 +49,7 @@ const program = new Command(packageJson.name) ...@@ -49,6 +49,7 @@ const program = new Command(packageJson.name)
.option('--ts, --typescript', 'Initialize as a TypeScript project. (default)') .option('--ts, --typescript', 'Initialize as a TypeScript project. (default)')
.option('--js, --javascript', 'Initialize as a JavaScript project.') .option('--js, --javascript', 'Initialize as a JavaScript project.')
.option('--tailwind', 'Initialize with Tailwind CSS config. (default)') .option('--tailwind', 'Initialize with Tailwind CSS config. (default)')
.option('--react-compiler', 'Initialize with React Compiler enabled.')
.option('--eslint', 'Initialize with ESLint config.') .option('--eslint', 'Initialize with ESLint config.')
.option('--biome', 'Initialize with Biome config.') .option('--biome', 'Initialize with Biome config.')
.option('--app', 'Initialize as an App Router project.') .option('--app', 'Initialize as an App Router project.')
...@@ -239,6 +240,7 @@ async function run(): Promise<void> { ...@@ -239,6 +240,7 @@ async function run(): Promise<void> {
empty: false, empty: false,
turbopack: true, turbopack: true,
disableGit: false, disableGit: false,
reactCompiler: false,
} }
const getPrefOrDefault = (field: string) => const getPrefOrDefault = (field: string) =>
preferences[field] ?? defaults[field] preferences[field] ?? defaults[field]
...@@ -346,6 +348,30 @@ async function run(): Promise<void> { ...@@ -346,6 +348,30 @@ async function run(): Promise<void> {
preferences.eslint = false preferences.eslint = false
} }
if (
!opts.reactCompiler &&
!args.includes('--no-react-compiler') &&
!opts.api
) {
if (skipPrompt) {
opts.reactCompiler = getPrefOrDefault('reactCompiler')
} else {
const styledReactCompiler = blue('React Compiler')
const { reactCompiler } = await prompts({
onState: onPromptState,
type: 'toggle',
name: 'reactCompiler',
// TODO: Remove "Release Candidate" when React Compiler is stable
message: `Would you like to use ${styledReactCompiler} (Release Candidate)?`,
initial: getPrefOrDefault('reactCompiler'),
active: 'Yes',
inactive: 'No',
})
opts.reactCompiler = Boolean(reactCompiler)
preferences.reactCompiler = Boolean(reactCompiler)
}
}
if (!opts.tailwind && !args.includes('--no-tailwind') && !opts.api) { if (!opts.tailwind && !args.includes('--no-tailwind') && !opts.api) {
if (skipPrompt) { if (skipPrompt) {
opts.tailwind = getPrefOrDefault('tailwind') opts.tailwind = getPrefOrDefault('tailwind')
...@@ -486,6 +512,7 @@ async function run(): Promise<void> { ...@@ -486,6 +512,7 @@ async function run(): Promise<void> {
turbopack: opts.turbopack, turbopack: opts.turbopack,
rspack: opts.rspack, rspack: opts.rspack,
disableGit: opts.disableGit, disableGit: opts.disableGit,
reactCompiler: opts.reactCompiler,
}) })
} catch (reason) { } catch (reason) {
if (!(reason instanceof DownloadError)) { if (!(reason instanceof DownloadError)) {
...@@ -520,6 +547,7 @@ async function run(): Promise<void> { ...@@ -520,6 +547,7 @@ async function run(): Promise<void> {
turbopack: opts.turbopack, turbopack: opts.turbopack,
rspack: opts.rspack, rspack: opts.rspack,
disableGit: opts.disableGit, disableGit: opts.disableGit,
reactCompiler: opts.reactCompiler,
}) })
} }
conf.set('preferences', preferences) conf.set('preferences', preferences)
......
...@@ -47,6 +47,7 @@ export const installTemplate = async ({ ...@@ -47,6 +47,7 @@ export const installTemplate = async ({
skipInstall, skipInstall,
turbopack, turbopack,
rspack, rspack,
reactCompiler,
}: InstallTemplateArgs) => { }: InstallTemplateArgs) => {
console.log(bold(`Using ${packageManager}.`)); console.log(bold(`Using ${packageManager}.`));
...@@ -96,6 +97,28 @@ export const installTemplate = async ({ ...@@ -96,6 +97,28 @@ export const installTemplate = async ({
); );
} }
if (reactCompiler) {
const nextConfigFile = path.join(
root,
mode === "js" ? "next.config.mjs" : "next.config.ts",
);
let configContent = await fs.readFile(nextConfigFile, "utf8");
if (mode === "ts") {
configContent = configContent.replace(
"const nextConfig: NextConfig = {\n /* config options here */\n};",
`const nextConfig: NextConfig = {\n reactCompiler: true,\n};`,
);
} else {
configContent = configContent.replace(
"const nextConfig = {};",
`const nextConfig = {\n reactCompiler: true,\n};`,
);
}
await fs.writeFile(nextConfigFile, configContent);
}
const tsconfigFile = path.join( const tsconfigFile = path.join(
root, root,
mode === "js" ? "jsconfig.json" : "tsconfig.json", mode === "js" ? "jsconfig.json" : "tsconfig.json",
...@@ -223,6 +246,11 @@ export const installTemplate = async ({ ...@@ -223,6 +246,11 @@ export const installTemplate = async ({
} }
} }
if (reactCompiler) {
// TODO: Use "^19" when React Compiler is stable
packageJson.devDependencies["babel-plugin-react-compiler"] = "19.1.0-rc.3";
}
/** /**
* TypeScript projects will have type definitions and other devDependencies. * TypeScript projects will have type definitions and other devDependencies.
*/ */
......
...@@ -33,4 +33,5 @@ export interface InstallTemplateArgs { ...@@ -33,4 +33,5 @@ export interface InstallTemplateArgs {
skipInstall: boolean; skipInstall: boolean;
turbopack: boolean; turbopack: boolean;
rspack: boolean; rspack: boolean;
reactCompiler: boolean;
} }
...@@ -31,6 +31,7 @@ describe('create-next-app Biome configuration', () => { ...@@ -31,6 +31,7 @@ describe('create-next-app Biome configuration', () => {
'--app', '--app',
'--no-turbopack', '--no-turbopack',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
'--skip-install', '--skip-install',
], ],
nextTgzFilename, nextTgzFilename,
...@@ -59,6 +60,7 @@ describe('create-next-app Biome configuration', () => { ...@@ -59,6 +60,7 @@ describe('create-next-app Biome configuration', () => {
'--app', '--app',
'--no-turbopack', '--no-turbopack',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ cwd } { cwd }
...@@ -95,6 +97,7 @@ describe('create-next-app Biome configuration', () => { ...@@ -95,6 +97,7 @@ describe('create-next-app Biome configuration', () => {
'--app', '--app',
'--no-turbopack', '--no-turbopack',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ cwd } { cwd }
...@@ -131,6 +134,7 @@ describe('create-next-app Biome configuration', () => { ...@@ -131,6 +134,7 @@ describe('create-next-app Biome configuration', () => {
'--app', '--app',
'--no-turbopack', '--no-turbopack',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ cwd } { cwd }
...@@ -167,6 +171,7 @@ describe('create-next-app Biome configuration', () => { ...@@ -167,6 +171,7 @@ describe('create-next-app Biome configuration', () => {
'--app', '--app',
'--no-turbopack', '--no-turbopack',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ cwd } { cwd }
......
...@@ -28,6 +28,7 @@ describe('create-next-app ESLint configuration', () => { ...@@ -28,6 +28,7 @@ describe('create-next-app ESLint configuration', () => {
'--eslint', '--eslint',
'--no-tailwind', '--no-tailwind',
'--no-src-dir', '--no-src-dir',
'--no-react-compiler',
'--app', '--app',
'--no-turbopack', '--no-turbopack',
'--no-import-alias', '--no-import-alias',
...@@ -76,6 +77,7 @@ describe('create-next-app ESLint configuration', () => { ...@@ -76,6 +77,7 @@ describe('create-next-app ESLint configuration', () => {
'--eslint', '--eslint',
'--no-tailwind', '--no-tailwind',
'--no-src-dir', '--no-src-dir',
'--no-react-compiler',
'--app', '--app',
'--no-turbopack', '--no-turbopack',
'--no-import-alias', '--no-import-alias',
......
...@@ -39,6 +39,7 @@ describe('create-next-app', () => { ...@@ -39,6 +39,7 @@ describe('create-next-app', () => {
'--no-tailwind', '--no-tailwind',
'--no-src-dir', '--no-src-dir',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -81,6 +82,7 @@ describe('create-next-app', () => { ...@@ -81,6 +82,7 @@ describe('create-next-app', () => {
'--no-tailwind', '--no-tailwind',
'--no-src-dir', '--no-src-dir',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -113,6 +115,7 @@ describe('create-next-app', () => { ...@@ -113,6 +115,7 @@ describe('create-next-app', () => {
'--no-src-dir', '--no-src-dir',
'--no-import-alias', '--no-import-alias',
'--skip-install', '--skip-install',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
......
...@@ -49,6 +49,7 @@ describe('create-next-app with package manager bun', () => { ...@@ -49,6 +49,7 @@ describe('create-next-app with package manager bun', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
...@@ -78,6 +79,7 @@ describe('create-next-app with package manager bun', () => { ...@@ -78,6 +79,7 @@ describe('create-next-app with package manager bun', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
......
...@@ -38,6 +38,7 @@ describe('create-next-app with package manager npm', () => { ...@@ -38,6 +38,7 @@ describe('create-next-app with package manager npm', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
...@@ -67,6 +68,7 @@ describe('create-next-app with package manager npm', () => { ...@@ -67,6 +68,7 @@ describe('create-next-app with package manager npm', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
......
...@@ -38,6 +38,7 @@ describe('create-next-app with package manager pnpm', () => { ...@@ -38,6 +38,7 @@ describe('create-next-app with package manager pnpm', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
...@@ -67,6 +68,7 @@ describe('create-next-app with package manager pnpm', () => { ...@@ -67,6 +68,7 @@ describe('create-next-app with package manager pnpm', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
......
...@@ -46,6 +46,7 @@ describe('create-next-app with package manager yarn', () => { ...@@ -46,6 +46,7 @@ describe('create-next-app with package manager yarn', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
...@@ -75,6 +76,7 @@ describe('create-next-app with package manager yarn', () => { ...@@ -75,6 +76,7 @@ describe('create-next-app with package manager yarn', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
......
...@@ -29,6 +29,7 @@ describe('create-next-app prompts', () => { ...@@ -29,6 +29,7 @@ describe('create-next-app prompts', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
{ {
cwd, cwd,
...@@ -68,6 +69,7 @@ describe('create-next-app prompts', () => { ...@@ -68,6 +69,7 @@ describe('create-next-app prompts', () => {
'--no-tailwind', '--no-tailwind',
'--no-src-dir', '--no-src-dir',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
{ {
cwd, cwd,
...@@ -104,6 +106,7 @@ describe('create-next-app prompts', () => { ...@@ -104,6 +106,7 @@ describe('create-next-app prompts', () => {
'--no-turbopack', '--no-turbopack',
'--no-src-dir', '--no-src-dir',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
{ {
cwd, cwd,
...@@ -140,6 +143,7 @@ describe('create-next-app prompts', () => { ...@@ -140,6 +143,7 @@ describe('create-next-app prompts', () => {
'--no-turbopack', '--no-turbopack',
'--no-tailwind', '--no-tailwind',
'--no-src-dir', '--no-src-dir',
'--no-react-compiler',
], ],
{ {
cwd, cwd,
......
...@@ -35,6 +35,7 @@ describe('create-next-app --app (App Router)', () => { ...@@ -35,6 +35,7 @@ describe('create-next-app --app (App Router)', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -65,6 +66,7 @@ describe('create-next-app --app (App Router)', () => { ...@@ -65,6 +66,7 @@ describe('create-next-app --app (App Router)', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -93,6 +95,7 @@ describe('create-next-app --app (App Router)', () => { ...@@ -93,6 +95,7 @@ describe('create-next-app --app (App Router)', () => {
'--src-dir', '--src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -130,6 +133,7 @@ describe('create-next-app --app (App Router)', () => { ...@@ -130,6 +133,7 @@ describe('create-next-app --app (App Router)', () => {
'--src-dir', '--src-dir',
'--tailwind', '--tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -167,6 +171,7 @@ describe('create-next-app --app (App Router)', () => { ...@@ -167,6 +171,7 @@ describe('create-next-app --app (App Router)', () => {
'--empty', '--empty',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -206,6 +211,7 @@ describe('create-next-app --app (App Router)', () => { ...@@ -206,6 +211,7 @@ describe('create-next-app --app (App Router)', () => {
'--tailwind', '--tailwind',
'--empty', '--empty',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -245,6 +251,7 @@ describe('create-next-app --app (App Router)', () => { ...@@ -245,6 +251,7 @@ describe('create-next-app --app (App Router)', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
......
...@@ -33,24 +33,30 @@ describe.each(['app', 'pages'] as const)( ...@@ -33,24 +33,30 @@ describe.each(['app', 'pages'] as const)(
// eslint: ['--eslint', '--no-linter'], // eslint: ['--eslint', '--no-linter'],
eslint: ['--eslint'], eslint: ['--eslint'],
srcDir: ['--src-dir', '--no-src-dir'], // Trading test perf for robustness:
// srcDir and reactCompiler don't interact so we're testing them together
// instead of all permutations.
srcDirAndCompiler: [
'--src-dir --react-compiler',
'--no-src-dir --no-react-compiler',
],
tailwind: ['--tailwind', '--no-tailwind'], tailwind: ['--tailwind', '--no-tailwind'],
// shouldn't affect if the app builds or not // shouldn't affect if the app builds or not
// packageManager: ['--use-npm', '--use-pnpm', '--use-yarn', '--use-bun'], // packageManager: ['--use-npm', '--use-pnpm', '--use-yarn', '--use-bun'],
} }
const getPermutations = <T>(items: T[][]): T[][] => { const getCombinations = (items: string[][]): string[][] => {
if (!items.length) return [[]] if (!items.length) return [[]]
const [first, ...rest] = items const [first, ...rest] = items
const children = getPermutations(rest) const children = getCombinations(rest)
return first.flatMap((value) => return first.flatMap((value) =>
children.map((child) => [value, ...child]) children.map((child) => [...value.split(' '), ...child])
) )
} }
const flagPermutations = getPermutations(Object.values(allFlagValues)) const flagCombinations = getCombinations(Object.values(allFlagValues))
const testCases = flagPermutations.map((flags) => ({ const testCases = flagCombinations.map((flags) => ({
name: flags.join(' '), name: flags.join(' '),
flags, flags,
})) }))
......
...@@ -35,6 +35,7 @@ describe('create-next-app --no-app (Pages Router)', () => { ...@@ -35,6 +35,7 @@ describe('create-next-app --no-app (Pages Router)', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -70,6 +71,7 @@ describe('create-next-app --no-app (Pages Router)', () => { ...@@ -70,6 +71,7 @@ describe('create-next-app --no-app (Pages Router)', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -102,6 +104,7 @@ describe('create-next-app --no-app (Pages Router)', () => { ...@@ -102,6 +104,7 @@ describe('create-next-app --no-app (Pages Router)', () => {
'--src-dir', '--src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -138,6 +141,7 @@ describe('create-next-app --no-app (Pages Router)', () => { ...@@ -138,6 +141,7 @@ describe('create-next-app --no-app (Pages Router)', () => {
'--src-dir', '--src-dir',
'--tailwind', '--tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -176,6 +180,7 @@ describe('create-next-app --no-app (Pages Router)', () => { ...@@ -176,6 +180,7 @@ describe('create-next-app --no-app (Pages Router)', () => {
'--no-tailwind', '--no-tailwind',
'--empty', '--empty',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -216,6 +221,7 @@ describe('create-next-app --no-app (Pages Router)', () => { ...@@ -216,6 +221,7 @@ describe('create-next-app --no-app (Pages Router)', () => {
'--tailwind', '--tailwind',
'--empty', '--empty',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
...(process.env.NEXT_RSPACK ? ['--rspack'] : []), ...(process.env.NEXT_RSPACK ? ['--rspack'] : []),
], ],
nextTgzFilename, nextTgzFilename,
...@@ -256,6 +262,7 @@ describe('create-next-app --no-app (Pages Router)', () => { ...@@ -256,6 +262,7 @@ describe('create-next-app --no-app (Pages Router)', () => {
'--no-src-dir', '--no-src-dir',
'--no-tailwind', '--no-tailwind',
'--no-import-alias', '--no-import-alias',
'--no-react-compiler',
], ],
nextTgzFilename, nextTgzFilename,
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment