Use in webpack
See original GitHub issueThe postcss readme suggest I can replace the webpack “css modules” loader with postcss-modules
:
https://github.com/postcss/postcss-loader#integration-with-css-modules
But how exactly? A primitive approach:
postcss: function () {
return [require('postcss-modules')];
}
causes .json files to be written out. I need the JSON to be returned to the require() statement though.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Getting Started - webpack
Webpack is used to compile JavaScript modules. Once installed, you can interact with webpack either from its CLI or API.
Read more >Getting Started With Webpack - Smashing Magazine
webpack is a highly extensible and configurable static module bundler for JavaScript applications. With its extensible nature, you can plug in ...
Read more >A Beginner's Guide to Webpack - SitePoint
As its core, webpack is a static module bundler. In a particular project, webpack treats all files and assets as modules. Under the...
Read more >Webpack Tutorial for Beginners: A Complete Step ... - CodeinWP
Webpack uses a specific JavaScript file, named in package.json , as something called an entry point. The entry point indicates to webpack which ......
Read more >An intro to Webpack: what it is and how to use it
In brief, Webpack goes through your package and creates what it calls a dependency graph which consists of various modules which your webapp ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thats a bummer.
What does css-loader do that postcss-loader cannot replicate (or does not want to replicate)?
that’s said 😢 i’d rather use postcss/* tools only than in combination with css-loader.
don’t understand what’s the issue though. seems like there should a natural way to use postcss-loader in couple with postcss-modules