onebay / vite-plugin-imp

A vite plugin for import library component style automatic.
MIT License
232 stars 24 forks source link

Sourcemap is likely to be incorrect #7

Closed toggery closed 3 years ago

toggery commented 3 years ago

When run build script, the command line displays as follows:

Sourcemap is likely to be incorrect: a plugin (vite-plugin-imp) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help

psaren commented 3 years ago

When run build script, the command line displays as follows:

Sourcemap is likely to be incorrect: a plugin (vite-plugin-imp) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help

Could you provide a minimal reproduce repo or the steps to reproduce the behavior?

toggery commented 3 years ago

The steps to reproduce:

  1. Download the repo https://github.com/cawa-93/vite-electron-builder;
  2. Extract the downloaded zip file and cd into the directory vite-electron-builder-main;
  3. Install the dependencies: npm install or yarn;
  4. Add the UI component lib: npm install element-plus --save or yarn add element-plus
  5. Add the plugin : npm install vite-plugin-imp -D or yarn add vite-plugin-imp -D;
  6. Edit the vite.config.js follow the instructions;
  7. In the file packages/render/src/components/home.vue, import and use the component ElButton;
  8. Run the compile script: npm run compile or yarn compile, then the tips appears;
packages/renderer/
  vite v2.1.2 building for production...
  ✓ 30 modules transformed.
rendering chunks (1)...  Sourcemap is likely to be incorrect: a plugin (vite-plugin-imp) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
psaren commented 3 years ago

Fixed in v2.0.5!

toggery commented 3 years ago

Great! It works normally after update.

mushan0x0 commented 3 years ago

@psaren V2.0.7 still encountered this problem when processing the antd library.

psaren commented 3 years ago

@mushan0x0 Providing a reproducible repo can help me locate the problem.

Winston-Guess commented 2 years ago

I still have this issue in 2.8.6. Anyone found a cure?

GuichiZhao commented 2 years ago

Reopen this please, the issue appears agian

Emily-0616 commented 2 years ago

i have the same problem!!!

ThatBrianDude commented 1 year ago

Im getting the inccorect line number in chrome. I have this issue but its locked.

https://github.com/onebay/vite-plugin-imp/issues/7#issuecomment-877030438

Please unlock or provide a solution...