Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to postcss.config.mjs, add type #63380

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;
2 changes: 1 addition & 1 deletion packages/create-next-app/templates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const installTemplate = async ({
if (!tailwind)
copySource.push(
mode == "ts" ? "tailwind.config.ts" : "!tailwind.config.js",
"!postcss.config.cjs",
"!postcss.config.mjs",
);

await copy(copySource, root, {
Expand Down
8 changes: 4 additions & 4 deletions test/integration/create-next-app/lib/specification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const projectSpecification: ProjectSpecification = {
'pages/_app.js',
'pages/api/hello.js',
'pages/index.js',
'postcss.config.cjs',
'postcss.config.mjs',
'tailwind.config.js',
],
deps: [],
Expand All @@ -80,7 +80,7 @@ export const projectSpecification: ProjectSpecification = {
'pages/_app.tsx',
'pages/api/hello.ts',
'pages/index.tsx',
'postcss.config.cjs',
'postcss.config.mjs',
'tailwind.config.ts',
'tsconfig.json',
],
Expand Down Expand Up @@ -125,7 +125,7 @@ export const projectSpecification: ProjectSpecification = {
'app/layout.js',
'app/page.js',
'jsconfig.json',
'postcss.config.cjs',
'postcss.config.mjs',
'tailwind.config.js',
],
},
Expand All @@ -143,7 +143,7 @@ export const projectSpecification: ProjectSpecification = {
'app/layout.tsx',
'app/page.tsx',
'next-env.d.ts',
'postcss.config.cjs',
'postcss.config.mjs',
'tailwind.config.ts',
'tsconfig.json',
],
Expand Down
2 changes: 1 addition & 1 deletion test/integration/create-next-app/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const shouldBeTemplateProject = ({
files: getProjectSetting({ template, mode, setting: 'files', srcDir }),
})

// Tailwind templates share the same files (tailwind.config.js, postcss.config.cjs)
// Tailwind templates share the same files (tailwind.config.js, postcss.config.mjs)
if (template !== 'app-tw' && template !== 'default-tw') {
projectFilesShouldNotExist({
cwd,
Expand Down