By tracking the compilation process of vite, it is not difficult to find that the preprocessing of vite's style does not output a sourcemap under the action of the css.devSourcemap configuration, but the current plugin directly provides a sourcemap, which leads to inconsistency in behavior.
Looking at the source code of style in @vite/plugin-vue, you can find that there is a piece of code as follows(https://github.com/vitejs/vite/blob/HEAD/packages/plugin-vue/src/style.ts#L26):
There is an option to turn off the sourcemap output of css. And that option comes from the
configResolved
hook in index.ts.(see https://github.com/vitejs/vite/blob/HEAD/packages/plugin-vue/src/index.ts#L132)By tracking the compilation process of vite, it is not difficult to find that the preprocessing of vite's style does not output a sourcemap under the action of the
css.devSourcemap
configuration, but the current plugin directly provides a sourcemap, which leads to inconsistency in behavior.