Skip to content

Commit

Permalink
Switch to postcss.config.mjs, add type
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky authored Mar 17, 2024
1 parent f1a999e commit 089b0a9
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 26 deletions.

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

0 comments on commit 089b0a9

Please sign in to comment.