Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cjholowatyj's avatar

Anyone get unplugin-auto-import to work with Vite?

I'm trying to get unplugin-auto-import to work within my Laravel/Vue3/Vite/InertiaJS+SSR/Typescript/Pinia project, and no matter what configuration I try, I seem to always get a ref is not defined error in the browser. Anyone get this Vite plugin to work?

My plugin config in vite.config.ts is literally bare bones at the moment:

...
AutoImport({
	imports:['vue']
})
...

and in my tsconfig.app.json file I have:

"include": [
	"auto-imports.d.ts",
	...
],
...

I have tried dts: true, and vueTemplate: true, and neither seem to make a difference...

0 likes
0 replies

Please or to participate in this conversation.