kriasoft / isomorphic-style-loader

CSS style loader for Webpack that is optimized for isomorphic (universal) web apps.
https://reactstarter.com
MIT License
1.27k stars 144 forks source link

fix:css-module-compatible #208

Open YanZiSen opened 1 year ago

YanZiSen commented 1 year ago

add compatible for css-loader>4.x and css-modules;

this situation css-loader transformed module will export.default;

this solution add a option getCss to get the transformed module;

useage:

{
  loader: "isomorphic-style-loader",
  options: {
    getCss: (css) => {
      return css.default;
    },
  },
},