From 2c20b7a62303f631e9d239030854f91ac8797d1c Mon Sep 17 00:00:00 2001 From: GrygrFlzr Date: Sun, 21 Feb 2021 20:23:07 +0700 Subject: [PATCH 1/3] Fix postcss.config.cjs modification on Windows Fixes #4 --- preset.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preset.ts b/preset.ts index 5b018c1..b4a78be 100644 --- a/preset.ts +++ b/preset.ts @@ -28,7 +28,7 @@ Preset.edit(["postcss.config.cjs"]).update((match) => { let result = match; result = `const tailwindcss = require("tailwindcss");\n${result}`; - const matchPlugins = /plugins:[\s\n]\[[\s\n]*((?:.|\n)+)[\s\n]*\]/m; + const matchPlugins = /plugins:[\s\r\n]\[[\s\r\n]*((?:.|\r?\n)+)[\s\r\n]*\]/m; result = result.replace(matchPlugins, (_match, otherPlugins) => addTailwind(otherPlugins)); return result; From 37089c9a347a289ce6bb78545fd9214907054ed2 Mon Sep 17 00:00:00 2001 From: GrygrFlzr Date: Sun, 21 Feb 2021 20:27:55 +0700 Subject: [PATCH 2/3] Use tailwind.config.cjs as config --- preset.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preset.ts b/preset.ts index b4a78be..1301da3 100644 --- a/preset.ts +++ b/preset.ts @@ -7,7 +7,7 @@ const globalCSS = `@tailwind base; const addTailwind = (otherPlugins) => `plugins: [ // Some plugins, like postcss-nested, need to run before Tailwind - tailwindcss, + tailwindcss("./tailwind.config.cjs"), // But others, like autoprefixer, need to run after From 75eeac36108a1ed7108f4ff194d5788e66c428cf Mon Sep 17 00:00:00 2001 From: GrygrFlzr Date: Mon, 22 Feb 2021 07:17:44 +0700 Subject: [PATCH 3/3] Revert "Use tailwind.config.cjs as config" This reverts commit 37089c9a347a289ce6bb78545fd9214907054ed2. --- preset.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preset.ts b/preset.ts index 1301da3..b4a78be 100644 --- a/preset.ts +++ b/preset.ts @@ -7,7 +7,7 @@ const globalCSS = `@tailwind base; const addTailwind = (otherPlugins) => `plugins: [ // Some plugins, like postcss-nested, need to run before Tailwind - tailwindcss("./tailwind.config.cjs"), + tailwindcss, // But others, like autoprefixer, need to run after