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
2121- Evaluate theme functions in plugins and JS config files ([ #14326 ] ( https://github.com/tailwindlabs/tailwindcss/pull/14326 ) )
2222- Ensure theme values overridden with ` reference ` values don't generate stale CSS variables ([ #14327 ] ( https://github.com/tailwindlabs/tailwindcss/pull/14327 ) )
2323- 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 ) )
2425
2526## [ 4.0.0-alpha.21] - 2024-09-02
2627
Original file line number Diff line number Diff line change @@ -5,5 +5,9 @@ export * from './compile'
55// In Bun, ESM modules will also populate `require.cache`, so the module hook is
66// not necessary.
77if ( ! 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' ) ) )
913}
Original file line number Diff line number Diff line change @@ -6,5 +6,10 @@ export * from './compile'
66// not necessary.
77if ( ! process . versions . bun ) {
88 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' ) ) )
1015}
You can’t perform that action at this time.
0 commit comments