We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef3dbde commit 8f30f36Copy full SHA for 8f30f36
esbuild.mjs
@@ -40,6 +40,22 @@ let ctx = await esbuild.context({
40
}))
41
},
42
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
59
{
60
// https://github.com/evanw/esbuild/issues/1051#issuecomment-806325487
61
name: 'native-node-modules',
0 commit comments