我已经使用Vue CLI 3项目,并在该项目中使用了自定义的本地字体。这些自定义字体在本地运行良好,但在构建服务器后无法正常工作。 这与我的Vue.config.js文件有关吗?
这是我的vue.config.js文件。
module.exports = {
publicPath: '/', // Base directory for dev
configureWebpack: {
module: {
rules: [{
test: /\.(ttf|otf|eot|woff|woff2)$/,
use: {
loader: "file-loader",
options: {
name: "assets/fonts/[name].[ext]",
},
},
}]
}
}
}