In webpack project development, will inevitably require some icons, if used bootstrap4, I would run into some ask, because bootstrap 4.x version to separate out as a separate item open-iconic icon, so cnpm i bootstrap -S It is not enough. Also you need to install open-iconic project.
1. Download installation: cnpm i bootstrap -S
If it is more than 4 version, you also need to install -D cnpm i https://github.com/iconic/open-iconic.git
2. main.js introduced (the master file of personal, some index.js)
1 import 'bootstrap/dist/css/bootstrap.css' 2 import 'open-iconic/font/css/open-iconic-bootstrap.css'
3. disposed in webpack.config.js
1 {test:/\.(ttf|eot|svg|woff|woff2|otf)$/, use: 'url-loader'}
4. In the index.html
<span class="oi oi-account-login"></span> <span class="oi oi-account-logout"></span>
effect:
More icons Address: https://useiconic.com/open#icons