Skip to content

Sourcemaps are broken #6

@Dmitra

Description

@Dmitra

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions