引入字体
=======
* 1.使用font-face来申明字体
@font-face{
font-family:'ff';
src:'';
}
.test{
font-family:'ff';
font-size:20px;
}
.test::before{
content:'';
}
* 2.在入口文件中引用css
import 'xx.css';
* 3.安装 file-loader
npm i -D file-loader
* 4.修改配置文件webpack.config.js
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
module.exports = {
entry: './src/app.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'app.js',
},
plugins: [
new HtmlWebp