Subwaytime / vite-aliases

Alias auto generation for Vite
https://www.npmjs.com/package/vite-aliases
MIT License
210 stars 12 forks source link

New version seems to break Vite 2 #45

Closed edankwan closed 1 year ago

edankwan commented 1 year ago

I got the No "exports" main defined in /opt/build/repo/node_modules/vite-aliases/package.json error.

Subwaytime commented 1 year ago

You have to add type: "module" to your package.json, as this package moved over to ESM. Also vite 2 support is not guaranteed anymore with newer versions of this package, as vite 3 and the upcoming vite 4 have major breaking changes to the plugin structure, it is also not advised to keep using it! ;)