Evan Wallace
Evan Wallace
As is mentioned in the documentation you linked to, this behavior was deliberately copied from Webpack. I'd like to keep the behavior consistent with Webpack so packages can standardize on...
Since then, comment preservation was added for more kinds of comments. See also #2721 and [v0.16.14](https://github.com/evanw/esbuild/releases/v0.16.14). There is still no guarantee that esbuild will preserve all comments but it does...
I'm closing this as it's working as intended, for the reasons described above.
FWIW this will currently minify a bit better if you use `let` instead of `var`. I'm assuming this is generated code so you are able to make that change. One...
My Svelte comment in https://github.com/evanw/esbuild/issues/3568#issuecomment-1872258022 was talking about this behavior: https://github.com/evanw/esbuild/issues/604. The code esbuild sees is not the entire module. In particular, the surrounding HTML expects to be able to...
The `exports` field is not just for Webpack, esbuild supports it too. For example: https://esbuild.github.io/api/#conditions. Did you try it?
> the source maps aren't loaded for the dev build, do I need to specify in exports for sourcemaps? There's no way to answer this without a way to reproduce...
I'm closing this issue because a way to produce it was not provided. We can reopen it later if there's more information.
An alternative could be to have esbuild generate extra code to re-create the TDZ checks at run-time. I suspect that would be a very unpopular change, however, due to the...
> The umd code I built using webpack and compressed using esbuild If you are just using esbuild for minification (what you are calling compression), then it seems to make...