Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
201 views
in Technique[技术] by (71.8m points)

vue2.6.12源码调试报错

小白求大神指点,vue 源码调试按照网上的教程修改

package.json:
"dev": "rollup -w -c scripts/config.js --environment TARGET:web-full-dev --sourcemap",

scripts/config.js:
sourceMap: true // 为了更清晰调试代码,建议你开启

examples/commits/index.html:
<script src="../../dist/vue.js"></script>

然后运行examples/commits/index.html出现错误
image
image

查看vue.js 这些参数全是undefined

vue版本为2.6.12


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

解决了,这是我把rollup-plugin-alias升级到最新版本2.2.0后执行npm run dev报的错,因为我直接把源码拉下来rollup-plugin-alias的版本是^1.3.1,执行npm run dev出现不能加载config这个js的问题,网上是说rollup-plugin-alias插件在window下的bug,于是我升级到最新没有出现不能加载的问题,但是访问页面出现了一系列新的问题,怎么都解决不了,最后发现是我的文件夹有中文名字,最后rollup-plugin-alias还是用的^1.3.1这个版本


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...