Thank you for this interesting idea and plugin implementation!
I'm trying to migrate from webpack + linaria to vite + css modules and found this plugin very close to make the migration process almost as a drop-in replacement. Here are some of the tweaks made: https://github.com/Dmitra/vite-plugin-inline-css-modules.
The only thing I cannot make to work are sourcemaps. They are wrong and it looks like for exact amount of removed lines from the original file.
Is it because they are not taken care of here: https://github.com/bluskript/vite-plugin-inline-css-modules/blob/master/src/index.ts#L70 ?
Do you have any ideas how to fix it?
Thank you for this interesting idea and plugin implementation!
I'm trying to migrate from
webpack + linariatovite + css modulesand found this plugin very close to make the migration process almost as a drop-in replacement. Here are some of the tweaks made: https://github.com/Dmitra/vite-plugin-inline-css-modules.The only thing I cannot make to work are sourcemaps. They are wrong and it looks like for exact amount of removed lines from the original file.
Is it because they are not taken care of here: https://github.com/bluskript/vite-plugin-inline-css-modules/blob/master/src/index.ts#L70 ?
Do you have any ideas how to fix it?