unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue
https://www.npmjs.com/package/unplugin-vue-components
MIT License
3.65k stars 341 forks source link

User's exclude config maybe cause Vite's pre-bundled file's sourcemap missing #742

Closed windsonR closed 2 months ago

windsonR commented 3 months ago

Description

When user set their exclude option to an Array like [/aaa/,/bbb/]

User's exclude DO NOT contains node_modules/.vite or node_modules which is specified in default exclude array.

Then when Browser request pre-bundled file, plugin WILL transform them and generate a new sourcemap for them

The new sourcemap will override the original sourcemap generated by vite

Linked Issues

Additional context

stackblitz[bot] commented 3 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

antfu commented 2 months ago

Thanks but this is by design. To allow users to have full control over what to include/exclude. The new implementation takes away the capability. Instead, we could expose some constant for defaultInlcudes and defaultExcludes