如何使用vue-cli'npm run build'命令构建Vue项目,该命令将在'img','script''link'等标签中包含相对引用?

时间:2017-04-25 12:48:46

标签: webpack vue.js vuejs2

我需要引用看起来像这样:'。 / static / img / i.png'。 现在,在构建项目之后,它看起来像这样:' / static / img / i.png'。

我的问题: 当我尝试在浏览器中打开构建项目时,它不会显示图像。当我将调试器中链接的外观更改为:'时。 / static / img / i.png',一切正常。

可以通过在webpack配置文件中进行一些更改来解决这个问题吗?

0 个答案:

没有答案