本文介绍了VueJS:构建过程插入垃圾字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在开发期间(yarn run dev
),一切看起来和运行正常.当我 yarn run build
时,结果 dist
包含一堆垃圾字符.例如,©
变为 ©
,—
变为 –
.
During development (yarn run dev
) everything looks and operates normally. When I yarn run build
, the resulting dist
includes a bunch of junk characters. For example, ©
becomes ©
and —
becomes â€"
.
- "vue": "2.3.2"
- "vue-meta": "^1.5.8"
- "vue-router": "^2.5.3"
- "vuex": "^2.3.1"
推荐答案
确保在您的 index.html
页面中将编码设置为 utf-8
.它应该有一个 head
条目:
Ensure encoding is set to utf-8
in your index.html
page. It should have a head
entry of:
这篇关于VueJS:构建过程插入垃圾字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!