You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 12, 2022. It is now read-only.
According to the esbuild docs here, the transform API doesn't read from the filesystem, and doesn't resolve the tsconfig. I'm using MobX, and I need to define useDefineForClassFields in tsconfig for it to work correctly, but esbuild node loader doesn't pick it up.
The fix here would be to resolve it and pass it as tsconfigRaw:
According to the esbuild docs here, the transform API doesn't read from the filesystem, and doesn't resolve the tsconfig. I'm using MobX, and I need to define
useDefineForClassFieldsin tsconfig for it to work correctly, but esbuild node loader doesn't pick it up.The fix here would be to resolve it and pass it as
tsconfigRaw:const { code: js, warnings, map: jsSourceMap, } = transformSync(rawSource.toString(), { sourcefile: filename, sourcemap: 'both', loader: new URL(url).pathname.match(extensionsRegex)[1], target: `node${process.versions.node}`, format: format === 'module' ? 'esm' : 'cjs', + tsconfigRaw: resolveTsConfig(), })