在配置core-js的时候少写了一层use所以会报这个错,加上就可以了。
test
:
/\.js$/
,
exclude
:
/node_modules/
,
use
:
{
loader
:
'babel-loader'
,
options
:
{
presets
:
[
'@babel/preset-env'
,
useBuiltIns
:
'usage'
,
corejs
:
{
version
:
3
,
targets
:
{
chrome
:
'60'
,
firefox
:
'60'
,
ie
:
'9'
,
safari
:
'10'
,
edge
:
'17'
,
webpack
:
Unknown
option
: .
use
Buil
tIns
,Module
buil
d failed
ERROR in ./src/js/index.js
Module
buil
d failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] E:\betterLifeFuture\
webpack
\13.js兼容性处理\src\js\index.js:
Unknown
option
: .
use
Buil
tIns
. Ch
false
“
use
Buil
tIns
”: false,
此时不对 polyfill 做操作。如果引入 @babel/polyfill,则无视配置的浏览器兼容,引入所有的 polyfill。
entry
“
use
Buil
tIns
”: “entry”,
“corejs”: 2,
根据配置的浏览器兼容,引入浏览器不兼容的 polyfill。需要在入口文件手动添加 import ‘@babel/polyfill’,会自动根据 browserslist 替换成浏览器不兼容的所有 polyfil
configuration has an
unknown
property ‘publicPath’. These properties are valid: output?
理解:需要在ou
@Vue安装时报错Failed to download repo vuejs-templates/
webpack
-simple: connect ETIMEDOUT…
1.打开终端,输入命令:ping github.com 显 示超时。
2.打开 hosts文件,地址:C:\Windows\System32\drivers\etc
3.打开http://ping.chinaz.com/,搜索github.com的IP地址
这里随便找一个请求不超时的ip,例如:140.82.114.3
4:打开hosts
这是因为github的问题
1.打开终端(cmd),输入命令:ping 192.30.255.112 发现连接超时(这个地址是你报错时显示的地址);输入命令:ping github.com 显示超时。
2.打开地址:C:\Windows\System32\drivers\etc ,然后打开 hosts文件,查看是否为默认配置。如果不是默认配置,修改成默认配置。默认配置如下:
# This is a sample HOS