File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
packages/@tailwindcss-node/src Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
21
- Evaluate theme functions in plugins and JS config files ([ #14326 ] ( https://github.com/tailwindlabs/tailwindcss/pull/14326 ) )
22
22
- Ensure theme values overridden with ` reference ` values don't generate stale CSS variables ([ #14327 ] ( https://github.com/tailwindlabs/tailwindcss/pull/14327 ) )
23
23
- Don’t suggest named opacity modifiers in intellisense ([ #14339 ] ( https://github.com/tailwindlabs/tailwindcss/pull/14339 ) )
24
+ - Fix a crash with older Node.js versions ([ #14342 ] ( https://github.com/tailwindlabs/tailwindcss/pull/14342 ) )
24
25
25
26
## [ 4.0.0-alpha.21] - 2024-09-02
26
27
Original file line number Diff line number Diff line change @@ -5,5 +5,9 @@ export * from './compile'
5
5
// In Bun, ESM modules will also populate `require.cache`, so the module hook is
6
6
// not necessary.
7
7
if ( ! process . versions . bun ) {
8
- Module . register ( pathToFileURL ( require . resolve ( '@tailwindcss/node/esm-cache-loader' ) ) )
8
+ // `Module#register` was added in Node v18.19.0 and v20.6.0
9
+ //
10
+ // Not calling it means that while ESM dependencies don't get reloaded, the
11
+ // actual included files will because they cache bust directly via `?id=…`
12
+ Module . register ?.( pathToFileURL ( require . resolve ( '@tailwindcss/node/esm-cache-loader' ) ) )
9
13
}
Original file line number Diff line number Diff line change @@ -6,5 +6,10 @@ export * from './compile'
6
6
// not necessary.
7
7
if ( ! process . versions . bun ) {
8
8
let localRequire = Module . createRequire ( import . meta. url )
9
- Module . register ( pathToFileURL ( localRequire . resolve ( '@tailwindcss/node/esm-cache-loader' ) ) )
9
+
10
+ // `Module#register` was added in Node v18.19.0 and v20.6.0
11
+ //
12
+ // Not calling it means that while ESM dependencies don't get reloaded, the
13
+ // actual included files will because they cache bust directly via `?id=…`
14
+ Module . register ?.( pathToFileURL ( localRequire . resolve ( '@tailwindcss/node/esm-cache-loader' ) ) )
10
15
}
You can’t perform that action at this time.
0 commit comments