>> Tutorial Webpack for Beginners
1. What is CSS Loaders
- Use CSS loaders to load in only the styles we needed, into different parts of our application
- CSS becomes much more modular and esiser to manage
* CSS && Style loaders
- 2 different loader - css-loader, style-loader
+ Css loader, load the css into our JS file
+ Style-loader adds our css into the DOM
2. Step by step using
* Install CSS Loaders
* create file src/css/introComponent.css
* Configure webpack.config.js
- test: /\.css$/, //just wanted run on .css file
- loader: 'style-loader!css-loader', // which loader we use is style-loader and css-loader
* Running webpack
>> Tutorial Webpack for Beginners
Thank you

No comments:
Post a Comment