From 0623a4f79fb5521cd21b464f1895485553f3b658 Mon Sep 17 00:00:00 2001 From: moka-ayumu <10963468+moka-ayumu@users.noreply.github.com> Date: Tue, 31 Oct 2023 02:54:28 +0900 Subject: [PATCH] Modify tailwindcss related dependency of `create-next-app` (#57262) ### What? If the version of `autoprefixer` is 10.0.0 and the version of `tailwindcss` is less than 3.3.0, the error `RangeError: Maximum call stack size exceeded` occurs when you create with tailwindcss & typescript and run it. ### Why? The exact reason is unknown, but it appears to be a compatibility issue. Also, currently configuring tailwindcss with ts makes the tailwind config file in ts, which is supported since tailwindcss version 3.3.0. (In js, it works even if you set the version of `autoprefixer` to 10.0.1 and lower the version of tailwindcss.) ### How? Simply default the minimum version of `autoprefixer` to 10.0.1 and the minimum version of `tailwindcss` to 3.3.0. --- packages/create-next-app/templates/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/create-next-app/templates/index.ts b/packages/create-next-app/templates/index.ts index 0acc200fee636..166309f937e18 100644 --- a/packages/create-next-app/templates/index.ts +++ b/packages/create-next-app/templates/index.ts @@ -209,9 +209,9 @@ export const installTemplate = async ({ if (tailwind) { packageJson.devDependencies = { ...packageJson.devDependencies, - autoprefixer: '^10', + autoprefixer: '^10.0.1', postcss: '^8', - tailwindcss: '^3', + tailwindcss: '^3.3.0', } }