Cannot find name ‘Set‘. Do you need to change your target library? Try changing the `lib` compiler o

错误提示:Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to 'es2015' or later.

错误截图

Cannot find name ‘Set‘. Do you need to change your target library? Try changing the `lib` compiler o_第1张图片

错误解决方案:找到项目中tsconfig.json 将 target:es5 修改为 es6 如下图所示

Cannot find name ‘Set‘. Do you need to change your target library? Try changing the `lib` compiler o_第2张图片

再次执行即可

 

 

你可能感兴趣的:(前端打包)