Closed JensVanhulst closed 10 months ago
Common JS is deprecated in Vite 5 and will be removed in Vite 6. When you use this plugin in Vite 5 it shows a warning to this effect on the console, but the plugin does work in Vite 5.
To make the plugin compatible with Vite 6, an ESM version is needed
I have "type": "module"
in my package.json
so vite.config.ts
is treated as an ES module. Using Typescript 5.2.2 I'm getting this error on my use of vite-plugin-vuetify:
import vuetify from "vite-plugin-vuetify";
const vuetifyPlugins = vuetify({ autoImport: true }),
This expression is not callable. Type 'typeof import("/home/hamish/my-project/node_modules/vite-plugin-vuetify/dist/index")' has no call signatures.ts(2349)
Strangely builds seem to be working for now but my project is still WIP so I might yet encounter issues.
Ultimately an ESM version of this package is needed as @donalmurtagh has said.
https://vitejs.dev/guide/troubleshooting.html#cjs