"corejs": 2 是相对于@babel/runtime-corejs2与@babel/core与core-js中谁配置的
时间: 2023-06-26 08:07:15 浏览: 226
"@babel/runtime-corejs2" 和 "@babel/core" 都是 Babel 的依赖项,而 "core-js" 则是一个 JavaScript 标准库,提供了许多 ECMAScript 扩展功能的 polyfill 实现。在 Babel 的配置中, "corejs": 2 表示使用 core-js@2 版本的 polyfill。这个值的具体含义是告诉 Babel 使用 "@babel/runtime-corejs2" 这个包来提供 polyfill,而不是使用 "@babel/runtime"。因此,"corejs": 2 的设置与 "@babel/runtime-corejs2" 中的配置有关,与 "@babel/core" 无关。
相关问题
当采用 "sass": "1.26.8", "sass-loader": "8.0.2"版本时, "autoprefixer": "^7.1.2", "babel-core": "^6.22.1", "babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-loader": "^7.1.1", "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-runtime": "^6.22.0", "babel-plugin-transform-vue-jsx": "^3.5.0", "babel-preset-env": "^1.3.2", "babel-preset-stage-2": "^6.22.0", "chalk": "^2.0.1", "copy-webpack-plugin": "^4.0.1", "css-loader": "^0.28.0", "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^1.1.4", "friendly-errors-webpack-plugin": "^1.6.1", "html-webpack-plugin": "^2.30.1", "node-notifier": "^5.1.2", "optimize-css-assets-webpack-plugin": "^3.2.0", "ora": "^1.2.0", "portfinder": "^1.0.13", "postcss-import": "^11.0.0", "postcss-loader": "^2.0.8", "postcss-url": "^7.2.1", "rimraf": "^2.6.0", "sass": "1.26.8", "sass-loader": "8.0.2", "script-loader": "^0.7.2", "semver": "^5.3.0", "shelljs": "^0.7.6", "uglifyjs-webpack-plugin": "^1.1.1", "url-loader": "^0.5.8", "vue-loader": "^13.3.0", "vue-style-loader": "^3.0.1", "vue-template-compiler": "^2.5.2", "webpack": "^3.6.0", "webpack-bundle-analyzer": "^2.9.0", "webpack-dev-server": "^2.9.1", "webpack-merge": "^4.1.0"采用哪个版本匹配
当采用这些版本时,你可以使用以下版本来匹配:
- "sass": "1.26.8"
- "sass-loader": "8.0.2"
- "autoprefixer": "^7.1.2"
- "babel-core": "^6.22.1"
- "babel-helper-vue-jsx-merge-props": "^2.0.3"
- "babel-loader": "^7.1.1"
- "babel-plugin-syntax-jsx": "^6.18.0"
- "babel-plugin-transform-runtime": "^6.22.0"
- "babel-plugin-transform-vue-jsx": "^3.5.0"
- "babel-preset-env": "^1.3.2"
- "babel-preset-stage-2": "^6.22.0"
- "chalk": "^2.0.1"
- "copy-webpack-plugin": "^4.0.1"
- "css-loader": "^0.28.0"
- "extract-text-webpack-plugin": "^3.0.0"
- "file-loader": "^1.1.4"
- "friendly-errors-webpack-plugin": "^1.6.1"
- "html-webpack-plugin": "^2.30.1"
- "node-notifier": "^5.1.2"
- "optimize-css-assets-webpack-plugin": "^3.2.0"
- "ora": "^1.2.0"
- "portfinder": "^1.0.13"
- "postcss-import": "^11.0.0"
- "postcss-loader": "^2.0.8"
- "postcss-url": "^7.2.1"
- "rimraf": "^2.6.0"
- "sass": "1.26.8"
- "sass-loader": "8.0.2"
- "script-loader": "^0.7.2"
- "semver": "^5.3.0"
- "shelljs": "^0.7.6"
- "uglifyjs-webpack-plugin": "^1.1.1"
- "url-loader": "^0.5.8"
- "vue-loader": "^13.3.0"
- "vue-style-loader": "^3.0.1"
- "vue-template-compiler": "^2.5.2"
- "webpack": "^3.6.0"
- "webpack-bundle-analyzer": "^2.9.0"
- "webpack-dev-server": "^2.9.1"
- "webpack-merge": "^4.1.0"
"name": "duang2.0", "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@ant-design/colors": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-3.2.2.tgz", "integrity": "sha512-YKgNbG2dlzqMhA9NtI3/pbY16m3Yl/EeWBRa+lB1X1YaYxHrxNexiQYCLTWO/uDvAjLFMEDU+zR901waBtMtjQ==", "requires": { "tinycolor2": "^1.4.1" } }, "@ant-design/icons": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-2.1.1.tgz", "integrity": "sha512-jCH+k2Vjlno4YWl6g535nHR09PwCEmTBKAG6VqF+rhkrSPRLfgpU2maagwbZPLjaHuU5Jd1DFQ2KJpQuI6uG8w==" }, "@ant-design/icons-vue": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@ant-design/icons-vue/-/icons-vue-2.0.0.tgz", "integrity": "sha512-2c0QQE5hL4N48k5NkPG5sdpMl9YnvyNhf0U7YkdZYDlLnspoRU7vIA0UK9eHBs6OpFLcJB6o8eJrIl2ajBskPg==", "requires": { "@ant-design/colors": "^3.1.0", "babel-runtime": "^6.26.0" } }, "@babel/code-frame": { "version": "7.14.5", "resolved": "https://registry.nlark.com/@babel/code-frame/download/@babel/code-frame-7.14.5.tgz?cache=0&sync_timestamp=1623280394200&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.14.5.tgz", "integrity": "sha1-I7CNdA6D9JxeWZRfvxtD6Au/Tts=", "dev": true, "requires": { "@babel/highlight": "^7.14.5" } }, "@babel/compat-data": { "version": "7.14.5", "resolved": "https://registry.nlark.com/@babel/compat-data/download/@babel/compat-data-7.14.5.tgz?cache=0&sync_timestamp=1623280503073&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fcompat-data%2Fdownload%2F%40babel%2Fcompat-data-7.14.5.tgz", "integrity": "sha1-jvTBjljoAcXJXTwcDyh0omgPreo=", "dev": true }, "@babel/core": { "version": "7.14.6", "resolved": "https://registry.nlark.com/@babel/core/download/@babel/core-7.14.6.tgz", "integrity": "sha1-4IFOwalQAy/xbBOich3jmoQW/Ks=", "dev": true, 解析
首先,这段代码是一个JSON文件,它列出了一个JavaScript项目的依赖项和版本号。
以下是一些关于这些依赖项的说明:
- `@ant-design/colors`:这是一个Ant Design库的颜色模块,版本号为3.2.2。
- `@ant-design/icons`:这是Ant Design的图标库,版本号为2.1.1。
- `@ant-design/icons-vue`:这是Ant Design的Vue图标库,版本号为2.0.0。
- `@babel/code-frame`:这是Babel的代码框架模块,版本号为7.14.5。
- `@babel/compat-data`:这是Babel的兼容性数据模块,版本号为7.14.5。
- `@babel/core`:这是Babel的核心模块,版本号为7.14.6。
这些依赖项是在开发过程中用于构建和运行JavaScript项目的必要模块。
阅读全文