Skip to content

Commit a8efcb7

Browse files
Bump Jiti to v2.6 (#1464)
v2.6.0 of Jiti comes with a nice perf bump from lazy loading babel only when necessary.
1 parent ede2c7d commit a8efcb7

File tree

3 files changed

+40
-32
lines changed

3 files changed

+40
-32
lines changed

esbuild.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ let ctx = await esbuild.context({
4040
}))
4141
},
4242
},
43+
{
44+
name: 'patch-jiti',
45+
setup(build) {
46+
// TODO: Switch to rolldown and see if we can chunk split this instead?
47+
build.onLoad({ filter: /jiti\/lib\/jiti\.mjs$/ }, async (args) => {
48+
let original = await fs.readFile(args.path, 'utf8')
49+
50+
return {
51+
contents: original.replace(
52+
'createRequire(import.meta.url)("../dist/babel.cjs")',
53+
'require("../dist/babel.cjs")',
54+
),
55+
}
56+
})
57+
},
58+
},
4359
{
4460
// https://github.com/evanw/esbuild/issues/1051#issuecomment-806325487
4561
name: 'native-node-modules',

packages/tailwindcss-language-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"enhanced-resolve": "^5.16.1",
7575
"esbuild": "^0.25.5",
7676
"find-up": "5.0.0",
77-
"jiti": "^2.3.3",
77+
"jiti": "^2.6.0",
7878
"klona": "2.0.4",
7979
"minimist": "^1.2.8",
8080
"normalize-path": "3.0.0",

pnpm-lock.yaml

Lines changed: 23 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)