⊗tlWpCsICL 36 of 55 menu

Including CSS libraries in Webpack

You can install CSS libraries via npm and include them in CSS files. Let's look at the example of the library normalize.css. Let's install it:

npm install normalize.css

We import the library directly into the CSS file. In this case, at the beginning of the path, we should put a tilde ~. It will tell Webpack that the files should be looked for in node_modules. Let's import:

@import '~normalize.css'

Install and import the modern-css-reset library.

Build the project. See where the installed library goes when building.

enru