We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Under a very specific circumstance, the generated output from esbuild does not contain the //# sourceMappingURL= reference.
esbuild
//# sourceMappingURL=
If you write a simple plugin to rename the files on end, example below, the output does not contain the source map link.
However, if I go into node_modules and force the esbuild sourcemap input to be:
node_modules
sourcemap: 'linked',
It will work as expected.
Please update the types of sourcemap to be:
sourcemap?: boolean | 'inline' | 'linked';
With an implementation of:
sourcemap: options.sourcemap === true ? "external" : typeof options.sourcemap === 'string' ? options.sourcemap : false,
Here is an example plugin (you'll need to adapt for a working example):
const RenameOnEnd: Plugin = { name: 'rename-on-end', setup(build) { build.onEnd((result) => { for (const file of result.outputFiles || []) { if (file.path.endsWith('.js.map')) { continue; } file.path = file.path + '.special.js'; } }); } }; export default defineConfig({ entry: ['lambdas/*/*-handler.ts'], splitting: true, target: 'esnext', sourcemap: true, format: ['esm'], clean: true, outDir: 'dist/lambdas', esbuildPlugins: [RenameOnEnd], });
Related Issues: #775 #495
The text was updated successfully, but these errors were encountered:
fix: SourceMap Not Linked When Enabled egoist#1120
f137ed7
No branches or pull requests
Under a very specific circumstance, the generated output from
esbuild
does not contain the//# sourceMappingURL=
reference.If you write a simple plugin to rename the files on end, example below, the output does not contain the source map link.
However, if I go into
node_modules
and force theesbuild
sourcemap input to be:It will work as expected.
Please update the types of sourcemap to be:
With an implementation of:
Here is an example plugin (you'll need to adapt for a working example):
Related Issues:
#775
#495
Upvote & Fund
The text was updated successfully, but these errors were encountered: