Skip to content

Commit b05baaa

Browse files
philipp-spiessthecrypticace
authored andcommitted
Simplify Vite plugin and handle all CSS transforms in pre-transform hook
wip wip
1 parent c65f20a commit b05baaa

File tree

13 files changed

+712
-343
lines changed

13 files changed

+712
-343
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ crates/node/index.d.ts
66
crates/node/index.js
77
.next
88
.fingerprint
9+
.nuxt

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Support JavaScript configuration files using `@config` ([#14239](https://github.com/tailwindlabs/tailwindcss/pull/14239))
1414
- Support plugin options in `@plugin` ([#14264](https://github.com/tailwindlabs/tailwindcss/pull/14264))
1515

16+
### Added
17+
18+
- Add support for `@config` to load V3 JavaScript config files ([#14239](https://github.com/tailwindlabs/tailwindcss/pull/14239))
19+
- Add support for using the Vite extension with `css.transformer` set to `lightningcss` ([#14269](https://github.com/tailwindlabs/tailwindcss/pull/14269))
20+
1621
### Fixed
1722

1823
- Bring back type exports for the cjs build of `@tailwindcss/postcss` ([#14256](https://github.com/tailwindlabs/tailwindcss/pull/14256))
@@ -21,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2126
- Fix fallback values when using the CSS `theme()` function ([#14262](https://github.com/tailwindlabs/tailwindcss/pull/14262))
2227
- Fix support for declaration fallbacks in plugins ([#14265](https://github.com/tailwindlabs/tailwindcss/pull/14265))
2328
- Support bare values when using `tailwindcss/defaultTheme` ([#14257](https://github.com/tailwindlabs/tailwindcss/pull/14257))
29+
- Correctly update builds when using the Vite extension with `build --watch` ([#14269](https://github.com/tailwindlabs/tailwindcss/pull/14269))
2430

2531
### Changed
2632

integrations/utils.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import dedent from 'dedent'
22
import fastGlob from 'fast-glob'
33
import killPort from 'kill-port'
4-
import { execSync, spawn } from 'node:child_process'
4+
import { exec, spawn } from 'node:child_process'
55
import fs from 'node:fs/promises'
66
import net from 'node:net'
77
import { homedir, platform, tmpdir } from 'node:os'
@@ -89,11 +89,23 @@ export function test(
8989
console.log(`> cd ${relative}`)
9090
}
9191
if (debug) console.log(`> ${command}`)
92-
return execSync(command, {
93-
cwd,
94-
stdio: 'pipe',
95-
...childProcessOptions,
96-
}).toString()
92+
return new Promise((resolve, reject) => {
93+
exec(
94+
command,
95+
{
96+
cwd,
97+
...childProcessOptions,
98+
},
99+
(error, stdout, stderr) => {
100+
if (error) {
101+
console.error(stderr)
102+
reject(error)
103+
} else {
104+
resolve(stdout.toString())
105+
}
106+
},
107+
)
108+
})
97109
},
98110
async spawn(command: string, childProcessOptions: ChildProcessOptions = {}) {
99111
let resolveDisposal: (() => void) | undefined

0 commit comments

Comments
 (0)