[英]Unexpected token: name «Dom7», expected: punc «;» when create chunk from UglifyJs?
I'm developing a web front project.I run yarn serve is success, I run yarn lint tell me no errors.when I run yarn built it fail,the error is placed below.我正在开发一个 web 前端项目。我运行 yarn serve 是成功的,我运行 yarn lint 告诉我没有错误。当我运行 yarn build 它失败时,错误位于下方。
➜ g3_data git:(master) ✗ yarn build yarn run v1.19.1 $ vue-cli-service build process.env.NODE_ENV:production ➜ g3_data git:(master) ✗ yarn build yarn run v1.19.1 $ vue-cli-service build process.env.NODE_ENV:production
⠧ Building for production... ⠧ 生产建筑...
ERROR Failed to compile with 1 errors 15:39:42 ERROR 编译失败,出现 1 个错误 15:39:42
error错误
js/chunk-627505a2.c88aa55c.js from UglifyJs Unexpected token: name «Dom7», expected: punc «;» js/chunk-627505a2.c88aa55c.js 来自 UglifyJs 意外令牌:名称 «Dom7»,预期:punc «;» [js/chunk-627505a2.c88aa55c.js:134,6]
[js/chunk-627505a2.c88aa55c.js:134,6]
ERROR Build failed with errors.错误构建失败并出现错误。 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
错误命令失败,退出代码为 1。有关此命令的文档,请访问https://yarnpkg.com/en/docs/cli/run 。
I use swiper lib,I change the reference formate from "import Swiper from 'swiper'" to "import Swiper from 'swiper/js/swiper.js'"我使用 swiper lib,我将参考格式从“import Swiper from 'swiper'”更改为“import Swiper from 'swiper/js/swiper.js'”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.