LinbuduLab / esbuild-plugins

ESBuild plugins by @LinbuduLab
MIT License
113 stars 18 forks source link

[esbuild-plugin-clean] Named export 'clean' not found #93

Closed the-dijkstra closed 1 year ago

the-dijkstra commented 1 year ago

SyntaxError: Named export 'clean' not found. The requested module 'esbuild-plugin-clean' is a CommonJS module, which may not support all module.exports as named exports.

ekwoka commented 1 year ago

Same.

Both Clean and Copy are doing this in the lastest updates, and it's like the ESM stuff is just all broken.

We really need to move to a world where CJS is the second class citizen.

linbudu599 commented 1 year ago

SyntaxError: Named export 'clean' not found. The requested module 'esbuild-plugin-clean' is a CommonJS module, which may not support all module.exports as named exports.

Could you please provide a repo to repro this? Both CJS and ESM should be supported correctly, I need to check it in detail.

ekwoka commented 1 year ago

https://github.com/ekwoka/spotify-webapp

This has the issue.

So it works right now, but if you update copy and clean they both have the aforementioned error.

Scripts: scripts/esbuild.mjs

linbudu599 commented 1 year ago

@ekwoka This should be fixed in the latest patch version for all the plugins, I've tried in your project and it seems to work correctly now, if you still got any trouble, feel free to open issues and I'll fix it as soon as possible.

ekwoka commented 1 year ago

@linbudu599 It is working now for me 👍 Thanks!