Open steve-o opened 4 hours ago
That's quite specific 😁
Perhaps the issue is here?
Happy to take a PR with tests
Looks like the following is more conducive:
const sourcemap = result && result.map?.toUrl();
const contents = result && (sourcemap.startsWith('data:') ? result.code : `${result.code}
//# sourceMappingURL=${result.map?.toUrl()}`);
i.e. the sourcemap URL is presenting as a data URI and should not be linked.
data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLm1hcCIsInNvdXJjZXMiOltudW...
With
esbuild
0.23.1 and 0.24.0, when theesbuild-plugin-minify-html-literals
is enabled, if a component is not explicitly imported by name then the sourcemap output is absent the filename.Example:
With the following
esbuild
script:With the
index.ts
basically re-exporting components,With components looking similar to: