1. Install the following modules so that webpack can parse css files
cnpm install style-loader --save-dev cnpm install css-loader --save-dev cnpm install file-loader --save-dev
2. Install elementUi module
cnpm install element-ui@next -S
3. Add configuration in
{ test: /\\\\\\\\.css$/, loader: "style!css" }, { test: /\\\\\\\\.(eot|woff|woff2|ttf)([\\\\\\\\?]?.*)$/, loader: "file" }
4. Then introduce and register
import Element from 'element-ui' import 'element-ui/lib/theme-default/' (Element)
The above brief discussion on the method of importing the css library (elementUi) is all the content I share with you. I hope you can give you a reference and I hope you can support me more.