underfin / vite-plugin-vue2

Vue2 plugin for Vite
621 stars 84 forks source link

Conflict with vite-plugin-components when sourcemap enabled #90

Closed Djaler closed 3 years ago

Djaler commented 3 years ago

If I enable sourcemap in vite config (build.sourceMap: true), then I'll get this strange error: [vite] Internal server error: ENOENT: no such file or directory, open '/home/kromanov/Playground/vite-example/src/components/HelloWorld.vue?vue&type=style&index=0&scoped=true&lang.css'

Here you can check reproduction of the bug. Try to do npm run dev, you'll see error. Then disable sourcemap in vite config and run again. Error will gone. https://github.com/Djaler/vite-vue2-components-sourcemap-bug

Djaler commented 3 years ago

I honestly don't know from which side the problem is, maybe it needs to be solved in vite-plugin-components. I'll create the same issue there https://github.com/antfu/vite-plugin-components/issues/53

Djaler commented 3 years ago

@underfin can you check this, please?

Djaler commented 3 years ago

It is solved now when I switch from vite-plugin-components to unplugin-vue-components