vue cli引入bootstrap 字体路径错误

使用bootstrap时打包字体总是报字体路径错误,我的项目如下,

vue cli引入bootstrap 字体路径错误_第1张图片
image.png

具体错误请看这里:https://github.com/vuejs-templates/webpack/issues/166

在结尾有个大神给出了答案,但是不够仔细,我来补充一下

extract-text-webpack-plugin的官网文档:

https://github.com/webpack-contrib/extract-text-webpack-plugin

在readme中,官网解释如下

vue cli引入bootstrap 字体路径错误_第2张图片
image.png

其实在vue项目里就是如下配置

vue cli引入bootstrap 字体路径错误_第3张图片
image.png

你可能感兴趣的:(vue cli引入bootstrap 字体路径错误)