core-js module error
See original GitHub issueVersion
3.5.1
Environment info
mac os 10.14.3
Steps to reproduce
vue-cli-service serve --mode development
What is expected?
run the project correctly
What is actually happening?
With useBuiltIns option, required direct setting of corejs option 98% after emitting CopyPlugin ERROR Failed to compile with 36 errors 10:20:25 These dependencies were not found:
core-js/modules/es6.array.iterator in ./src/main.js, ./src/webapp/main.js core-js/modules/es6.function.name in ./src/main.js core-js/modules/es6.number.constructor in ./src/assets/js/utils.js core-js/modules/es6.object.assign in ./src/main.js, ./src/webapp/main.js core-js/modules/es6.object.to-string in ./src/main.js, ./src/assets/js/utils.js and 2 others core-js/modules/es6.promise in ./src/main.js, ./src/webapp/main.js core-js/modules/es6.regexp.match in ./src/assets/js/utils.js core-js/modules/es6.regexp.replace in ./src/main.js, ./src/assets/js/gt.js and 3 others core-js/modules/es6.regexp.split in ./src/assets/js/utils.js core-js/modules/es6.regexp.to-string in ./src/main.js, ./src/assets/js/utils.js and 1 other core-js/modules/es6.string.includes in ./src/store.js, ./src/main.js and 2 others core-js/modules/es6.string.iterator in ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref–12-0!./node_modules/_babel-loader@8.0.5@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref–0-0!./node_modules/_vue-loader@15.7.0@vue-loader/lib??vue-loader-options!./src/views/assets/Index.vue?vue&type=script&lang=js& core-js/modules/es6.typed.uint8-array in ./src/assets/js/utils.js core-js/modules/es7.array.includes in ./src/store.js, ./src/main.js and 3 others core-js/modules/es7.promise.finally in ./src/main.js, ./src/webapp/main.js core-js/modules/web.dom.iterable in ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref–12-0!./node_modules/_babel-loader@8.0.5@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref–0-0!./node_modules/_vue-loader@15.7.0@vue-loader/lib??vue-loader-options!./src/views/assets/Index.vue?vue&type=script&lang=js&
Issue Analytics
- State:
- Created 5 years ago
- Reactions:57
- Comments:30 (2 by maintainers)
Top GitHub Comments
babel.config.js
presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ]
This is reason: https://babeljs.io/docs/en/babel-preset-env#usebuiltins
So you can set: presets: [ [ “@vue/app”, { useBuiltIns: “entry” } ] ].
More important, you must set polyfills in code. ref: https://cli.vuejs.org/guide/browser-compatibility.html#usebuiltins-usage