Remove class objects generated by css-loader when using css-modules

Currently when the modules: true option is defined in css-loader configuration, a json object is added to js output for each css file. E.g


// style.css

.has-spinner {



// style.css (in js bundle)
  hasSpinner: 'someHashedCssModuleClass',

and then, in my case, it will be referenced by some React component:

// someComponent.js
<SomeComponent className={styles.hasSpinner}

I’m wondering if there is any loader/plugin that is capable of inlining the generated css properties and removing the json object like so:

// style.css
.someHashedCssModuleClass {

// someComponent.js
<SomeComponent className="someHashedCssModuleClass"

So that bundle size can be reduced.

191 thoughts on “Remove class objects generated by css-loader when using css-modules”

  1. Pingback: cheap cialis here
  2. Pingback: viagra 100 mg sale
  3. 119845 280648Youre so cool! I dont suppose Ive learn something like this before. So great to search out any person with some distinctive thoughts on this subject. realy thanks for starting this up. this web site is 1 thing thats wanted on the net, somebody with a bit originality. valuable job for bringing 1 thing new towards the internet! 149463

  4. Pingback: cvs ad
  5. Pingback: kamagra kopen
  6. Pingback: clomid 100mg cost
  7. Pingback: how to fix ed
  8. Pingback: canadian drugs
  9. Pingback: fda ivermectin
  10. How do you like this porn?

    Classic – Until the beginning of 1990 porn was considered “classic”. Lovers of retro will like it when there are a bunch of hairy cunts in the frame, all women with natural shapes, no silicone and scary tits. An interesting fact – fucking mustachioed men.
    Shemales are kinky girls from Thailand.
    Teens – teen porn. As a rule, 15-17 year olds are played by models 18-22 years old.
    Lesbians are lesbians. The most popular genre of porn in the world.
    Softcore is dull vanilla shit, not porn. Fucking is present, but without exposure of genitals and outrageously overflowing with romance.

  11. 914484 602130Hey there, I think your weblog may well be having browser compatibility issues. When I appear at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, superb weblog! 977003


Leave a Comment