typescript-plugin-css-modules icon indicating copy to clipboard operation
typescript-plugin-css-modules copied to clipboard

css-loader v7 support

Open barzilaysapir opened this issue 1 year ago • 1 comments

Some features are not working with the new css-loader@7 import syntax: import * as style from "./style.css"; https://github.com/webpack-contrib/css-loader/releases/tag/v7.0.0

I'm aware of the option to restore v6 behavior, but supporting this as well will be great!

barzilaysapir avatar Nov 13 '24 07:11 barzilaysapir

I was trying to find updated to a new style-loader API and didn't found, and then created own loader, feel free to use, I hope it will help to you as well

https://www.npmjs.com/package/css-modules-dts-loader,

{
    loader: require.resolve("css-modules-dts-loader"),
    options: {
        camelCase: true,
        quote: "double",
        indentStyle: "space",
        indentSize: 4,
        sort: true,
        mode: isProduction ? "verify" : "emit"
    }
}

Ch-Valentine avatar Feb 12 '25 12:02 Ch-Valentine