Open troy351 opened 2 years ago
I guess you import vue module by vue-demi. Such as import { reactive } from 'vue-demi
?
I didn't, actually pinia
does.
Can you provide minimal reproduction? I not quite sure your situation. Thanks.
Just create a new vite project with vue 2.7, import and init pinia
.
Set external vue
from this plugin.
npm run dev
everything works, vue
was not found as expectednpm run build
, there is a bundled vue
source code inside assets
folder which is not expectedI did some debug and found out it was caused by vue-demi
as the original issue said
I got it. Thanks. I will as soon as possible to deal with it. : )
Further more, I changed export * from 'vue'
to export { ref, onCreated, ...other-pinia-used-imports} from 'vue'
, it works again.
So I did this modification as a temporary workaround.
I write a new plugin to resolve those question. can take a look vite-plugin-cdn2. you can donwload the project and run the example. It provide a minimal example ( contain unplugin-vue-component
,pinia
)
I want to external
vue
, but itexport * from 'vue'
seems doesn't handled by this plugin.FYI. the problem was from
vue-demi