关于npm run test 启动项目问题 #9878
Unanswered
songbnb000
asked this question in
Help/Questions
Replies: 1 comment 2 replies
-
建议查看下运行模式, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
使用的脚手架版本@vue/cli 4.5.2 vue版本2.6.11
场景描述:
1.项目分别有.env.dev .env.test .env.uat .env.production这四个文件
2.启动npm run dev 和启动npm run test项目都可以正常跑起来
3.通过npm run dev启动的项目在vue.config.js的文件中transpileDependencies这个参数是可以正常生效的,故而在ie可以正常显示项目。4.通过npm run test命令启动的项目不仅会出现runtime.js(运行版???)这个文件,vue.config.js的文件中transpileDependencies这个参数不生效,故而无法成功在ie中显示。
5.运行uat的文件也可以transpileDependencies正常生效,在package.json中test和uat对应的启动命令为:
"test": "vue-cli-service serve --mode test",
"uat": "vue-cli-service serve --mode uat"
6.解决方法:"test": "vue-cli-service serve --mode test+"任意字符""。
问题:
为什么会引发这个问题?
7.谷歌没有这个问题,因为谷歌没有兼容性问题,不需要transpileDependencies这个参数
Beta Was this translation helpful? Give feedback.
All reactions