underfin / vite-plugin-vue2

Vue2 plugin for Vite
620 stars 83 forks source link

Source missing in chrome when debugging #191

Open Citriik opened 2 years ago

Citriik commented 2 years ago

Hello,

I'm using the latest version (2.0.0) of this package and when I try to debug something in chrome (it works in Firefox), the script and template section are missing in the source tab :(

image image

After some testing I figured out that if I change the style block to CSS instead of using a preprocessor then it works. Here is a minimal repro: https://github.com/Citriik/-vite-plugin-vue2-debug-error

Thanks.

Dams591 commented 2 years ago

Facing the same issue here ! Any idea ?

Citriik commented 2 years ago

I found something weird, if you install the package unplugin-vue-components and add it to the plugins in the vite.config.js it fixes the issue.

plugins: [
  createVuePlugin(),
  Components({
    dirs: [],
  }),
];
zen-liutao commented 2 years ago

I met the same issue. I found the inline soucemap is wrong. I generated the \n\n\n.....\n. I found a way to solve the problem in chrome. Just diable the js souce map option.

bobohuochai commented 2 years ago

I met the same issue...

Mr-xzq commented 2 years ago

I meet the same issue...

ZTjack commented 2 years ago

I met the same issue... Wish a fix

BenceSzalai commented 1 year ago

Same was raised with Vite. It turned out to be an issue with this plugin, but a workaround was put in place. However that may carry other issues too imho, but will see. Meanwhile a'm here to add a meaningful link between these two: Issue: https://github.com/vitejs/vite/issues/9830 Workaround fix: https://github.com/vitejs/vite/pull/9914