Evan Wallace
Evan Wallace
Yes, there is. But the only thing that an import assertion does is cause a build error if the assertion fails. For example, you will get a build error if...
The latest release of esbuild now supports bundling with import assertions: https://github.com/evanw/esbuild/releases/tag/v0.19.7. This should let you write an esbuild plugin that implements `with { type: 'css' }`.
> is whether the plugin can filter on import attributes? Yes, I think this would be a good idea. I also need to expose this to on-resolve plugins, and maybe...
You can use esbuild to minify CSS using esbuild the API: https://esbuild.github.io/api/#minify. It’s safe to call esbuild’s API from within a plugin. You can also access the esbuild API directly...
Here's the reproduction: [link](https://esbuild.github.io/try/#YgAwLjE5LjQALS1idW5kbGUgLS1mb3JtYXQ9ZXNtAGUAc3JjL2luZGV4LnRzAGNvbnNvbGUubG9nKGF3YWl0IFByb21pc2UuYWxsU2V0dGxlZChbCiBpbXBvcnQoJy4vc3ViLmpzJyksCiBpbXBvcnQoJyNzdWInKSwKIGltcG9ydCgnc3VicGF0aC1leHBvcnRzL3N1YicpLApdKSkAAHNyYy9zdWIudHMAZXhwb3J0IGRlZmF1bHQgU3ltYm9sLmZvcigiZXhwb3J0IikAAHBhY2thZ2UuanNvbgB7CiAgIm5hbWUiOiAic3VicGF0aC1leHBvcnRzIiwKICAidmVyc2lvbiI6ICIxLjAuMCIsCiAgInR5cGUiOiAibW9kdWxlIiwKICAiZXhwb3J0cyI6IHsKICAgICIuL3N1YiI6ICIuL2Rpc3Qvc3ViLmpzIgogIH0sCiAgImltcG9ydHMiOiB7CiAgICAiI3N1YiI6ICIuL2Rpc3Qvc3ViLmpzIgogIH0sCiAgImRlc2NyaXB0aW9uIjogIiIsCiAgImRlcGVuZGVuY2llcyI6IHsKICAgICJ0c3giOiAiXjMuMTIuNyIsCiAgICAidHlwZXNjcmlwdCI6ICJeNS4yLjIiLAogICAgInZpdGVzdCI6ICJeMC4zNC4zIgogIH0KfQAAdHNjb25maWcuanNvbgB7CiAgImNvbXBpbGVyT3B0aW9ucyI6IHsKICAgICJyb290RGlyIjogInNyYyIsCiAgICAib3V0RGlyIjogImRpc3QiLAogICAgIm5vRW1pdCI6IHRydWUsCiAgICAibW9kdWxlIjogIm5vZGUxNiIsCiAgICAibW9kdWxlUmVzb2x1dGlvbiI6ICJub2RlMTYiLAogICAgInNraXBMaWJDaGVjayI6IHRydWUsCiAgfQp9) Note to self: This request is that esbuild should interpret the `rootDir`, `outDir`, `module`, and `moduleResolution` settings exactly as TypeScript does in this case. TypeScript does...
I have done a lot of work with source map infrastructure over the years and I've only ever encountered one indexed source map (by chance, on a random website). So...
This is probably something that you are going to have to debug on your end, perhaps by building esbuild from source with additional debugging code added. The file watcher is...
You can annotate any arbitrary expression as pure (including template literals) for all tools that support pure annotations (including esbuild and Rollup) by [putting it in an IIFE](https://esbuild.github.io/try/#YgAwLjE5LjUAewogIGJ1bmRsZTogdHJ1ZSwKICBtaW5pZnk6IHRydWUKfQBlAGVudHJ5LmpzAGltcG9ydCB7IHRoaW5nMSB9IGZyb20gIi4vZmlsZSI7CmNvbnNvbGUubG9nKHRoaW5nMSk7AABmaWxlLmpzAGNvbnN0IHQgPSAodikgPT4gdjsKZXhwb3J0IGNvbnN0IHRoaW5nMSA9IC8qIEBfX1BVUkVfXyAqLyAoKCkgPT4gdGBoaWApKCk7CmV4cG9ydCBjb25zdCB0aGluZzIgPSAvKiBAX19QVVJFX18gKi8gKCgpID0+IHRgYnllYCkoKTs).
With the latest release, esbuild will now inline IIFEs that return an expression when minifying, so there should no longer be any performance impact from doing this.
I see. I’m sorry to hear that. What processor are you using, and how did you install node? Another question: if you don’t mind, can you install the Go compiler...