报错信息

WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel, we recommend explicitly setting the core-js version you are using via the `corejs` option.You should also be sure that the version you pass to the `corejs` option matches the version specified in your `package.json`'s `dependencies` section. If it doesn't, you need to run one of the following commands:npm install --save core-js@2    npm install --save core-js@3yarn add core-js@2              yarn add core-js@3When setting `useBuiltIns: 'usage'`, polyfills are automatically imported when needed.Please remove the `import '@babel/polyfill'` call or use `useBuiltIns: 'entry'` instead.
Hash: a4247c3ebe627bac8fac
Version: webpack 4.31.0
Time: 1286ms
Built at: 2019-05-11 14:18:36Asset       Size  Chunks             Chunk Namesindex.html  347 bytes          [emitted]
main.bundle.js   30.4 KiB    main  [emitted]  main
Entrypoint main = main.bundle.js
[./src/index.js] 269 bytes {main} [built]

查阅的资料 点我点我

解决方式

// .babelrc
{"presets": ["@babel/preset-flow",["@babel/preset-env",{"targets": {"node": "8.10"},"corejs": "3", // <---  此处加个这个,就没有报错警告了"useBuiltIns": "usage"}]]
}

其它环境信息

// package.json
{"name": "5-4_WebpackDevServer","version": "1.0.0","description": "","main": "index.js","scripts": {"build": "webpack"},"keywords": [],"author": "","license": "ISC","devDependencies": {"@babel/core": "^7.4.4","@babel/preset-env": "^7.4.4","@babel/preset-react": "^7.0.0","babel-loader": "^8.0.5","clean-webpack-plugin": "^2.0.2","css-loader": "^2.1.1","file-loader": "^3.0.1","html-webpack-plugin": "^3.2.0","node-sass": "^4.12.0","sass-loader": "^7.1.0","style-loader": "^0.23.1","url-loader": "^1.1.2","webpack": "^4.31.0","webpack-cli": "^3.3.2"}
}

Webpack打包警告: We noticed you're using the `useBuiltIns` option without declaring a core-js version.相关推荐

  1. webpack 打包警告超出文件大小

    webpack 打包超过文件大小 错误如图所示: 如图所示,vue项目中运行 npm run build 命令针对项目进行打包时的警告,黄色部分描述已经很清楚了,就是打包的文件大小超过了vue默认文件 ...

  2. 自定义配置webpack打包文件

    基础使用 安装 npm install webpack -g 模块化程序(配置过程忽略此步骤) cale.js function add(a,b){return a + b; } module.exp ...

  3. webpack打包压缩混淆_细说webpack系列 3. webpack-cli 零配置打包

    大家好!我是萝卜,webpack 4 带来了大量的更新,其中一个就是webpack 4 默认不需要配置文件,下面就带大家体验一下! 初始化项目 首先创建项目,创建一个名为webpack的文件夹,进入文 ...

  4. vue-cli+webpack打包配置

    vue-cli+webpack打包配置 一: 目录结构: ├── README.md ├── build │ ├── build.js │ ├── check-versions.js │ ├── ut ...

  5. webpack打包时提示:The following entrypoint(s) combined asset size exceeds the recommended limit

    如果webpack打包时提示:The following entrypoint(s) combined asset size exceeds the recommended limit,可以设置 &q ...

  6. webpack打包提示: The following entrypoint(s) combined asset size exceeds the recommended limit

    webpack打包时会出现: 原因是因为webpack打包提示文件体积过大导致报错. 优化方案: module.exports = {configureWebpack: config => {/ ...

  7. npm 及 webpack打包工具

    npm包管理工具 1,认识npm npm即node的包管理器 是Node.js默人的.以JavaScript编写的软件包管理系统 npm已经是前端工程师的标配 在npm上我们可以很方便的下载我们所需要 ...

  8. npm(了解)+Babel转码器+模块化+webpack打包

    目录 介绍 设置镜像导入依赖 其他命令 Babel转码器 模块化 es6怎么做模块化 webpack webpack的使用 介绍 一个包的管理工具,类似与Maven,用于前端中管理JS的依赖 查看版本 ...

  9. webpack打包工具学习(前端构建工具)

    webpack一个静态模块打包器 把html不能识别的静态文件编译成可识别的. 预编译处理器less / ES6语法等等 https://blog.csdn.net/weixin_33795806/a ...

  10. 如何使用Webpack打包

    简单的说了一下webpack是干嘛的,和webpack如何安装,如何进行打包,步骤很详细,感兴趣的同学可以试着操作一下. 文章目录 1.webpacks是什么? 2.Webpack安装 3.初始化项目 ...

最新文章

  1. Android setOnItemClickListener cannot be used with a spinner
  2. 开源的Blink和Spark3.0,谁将称霸大数据领域?
  3. 程序员看了表示很开心
  4. python程序题斐波那契数列_Python_经典题_斐波那契数列
  5. leetcode 303 python(动态规划)
  6. mysql ha_err_key_not_found_mysql主从同步报错:Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND...
  7. 网路游侠:铱迅软件版WEB应用防火墙试用
  8. Oracle笔记(一) Oracle简介及安装
  9. linux 命令chmod 755的意思
  10. 个人网站 域名 购买 解析 备案
  11. 户外运动手持GPS设备常识汇总
  12. vue设置浏览器顶部小图标
  13. Powershell 添加开机启动项
  14. 7-4 出圈游戏 (c 语言)PTA
  15. 制作U盘启动盘(无广告)
  16. 内网渗透代理知识以及渗透某CTF三层靶机实例
  17. 品Spring:bean定义上梁山
  18. 基于FPGA的快速FIR算法FFA
  19. 慕课网的python2020_2020中.国大学慕课Python开发入门答案
  20. melis系统c800_Dell bilgisayarda HDMI bağlantı noktasıyla ilgili Sık Sorulan Sorular (SSS)

热门文章

  1. 用html任选一首诗自动排版,利用 html2canvas 做个简单的诗词卡片生成器
  2. js 实现60秒倒计时
  3. SpringBoot 启动时自动执行代码的几种方式
  4. guge图标——ps
  5. 微信小程序 之修改switch组件尺寸大小
  6. Java对象内存分配流程
  7. python正确判断错误_python之错误、调试和测试
  8. EXCEL制作统计图表
  9. 移动硬盘只显示盘符,不显示容量,也不能打开
  10. svchost.exe“病毒”