简体   繁体   中英

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.

➜ 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

js/chunk-627505a2.c88aa55c.js from UglifyJs Unexpected token: name «Dom7», expected: punc «;» [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.

I use swiper lib,I change the reference formate from "import Swiper from 'swiper'" to "import Swiper from 'swiper/js/swiper.js'"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM