sagalbot / vue-select

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.
https://vue-select.org
MIT License
4.62k stars 1.33k forks source link

UMD build get's recognized as ESM by some bundlers such as esbuild/tsup #1804

Open segevfiner opened 8 months ago

segevfiner commented 8 months ago

Please respect maintainers time by filling in these sections. Your issue will likely be closed without this information.

Describe the bug The umd build gets recognized as ESM by esbuild/tsup because its file extension is .js and the package.json specifies "type": "module" it should have a .cjs extension to be recognized correctly.

Reproduction Link

Steps To Reproduce

  1. Build a package using vue-select with tsup for node (SSR) in CJS format.

Expected behavior It builds correctly, instead, due to incorrectly assuming the UMD build is ESM, the module.exports statement will be left in the bundle and will overwrite the real module.exports.