Skip to content

Commit bbc0bc6

Browse files
authored
fix: other postcss plugins should not run before tailwindcss (#38)
Maybe like the example in [tailwindcss documentation](https://v3.tailwindcss.com/docs/installation/using-postcss), the tailwindcss postcss plugin should in the first place: ```js module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, } } ```
1 parent deb6d53 commit bbc0bc6

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/checkout@v4
2222

2323
- name: Install Pnpm
24-
run: corepack enable
24+
run: npm i -g corepack@latest --force && corepack enable
2525

2626
- name: Setup Node.js
2727
uses: actions/setup-node@v4

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/checkout@v4
2929

3030
- name: Install Pnpm
31-
run: corepack enable
31+
run: npm i -g corepack@latest --force && corepack enable
3232

3333
- name: Setup Node.js
3434
uses: actions/setup-node@v4

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG
2+
3+
## 0.2.0
4+
5+
- Fixed bug that other postcss plugins should not run before tailwindcss.

src/TailwindCSSRspackPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,12 @@ class TailwindRspackPluginImpl {
260260
]);
261261

262262
const processor = postcss([
263-
...(options.postcssOptions?.plugins ?? []),
264263
// We use a config path to avoid performance issue of TailwindCSS
265264
// See: https://github.com/tailwindlabs/tailwindcss/issues/14229
266265
tailwindcss({
267266
config: configPath,
268267
}),
268+
...(options.postcssOptions?.plugins ?? []),
269269
]);
270270

271271
TailwindRspackPluginImpl.#postcssProcessorCache.set(entryName, [

0 commit comments

Comments
 (0)