activeguild / vite-plugin-sass-dts

This is a plugin that automatically creates a type file when using the CSS module type-safely.
MIT License
120 stars 19 forks source link

fix: remove source map warnings for files that are not processed by vite-plugin-sass-dts #63

Closed tmair closed 1 year ago

tmair commented 1 year ago

Vite issues the following warning when ignoring files for transformation.

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

It will also break source maps as the warning states. Returning undefined from the transformation function will remove the warning and fix broken source maps.

activeguild commented 1 year ago

@tmair

Thanks for the PR.