1)SyntaxError SyntaxError是解析代码时发生的语法错误 // 变量名错误 var 1a; // 缺少括号 console.log 'hello'); (2)ReferenceError ReferenceError是引用一个不存在的变量时发生的错误. unknownVariable // ReferenceError: unknownVariable is not defined 另一种触发场景是,将一个值分配给无法分配的对象,比如对函数的运行结果或者this赋值.…
打包项目时,在vscode中输入如下命令 webpack .\src\main.js .\dist\bundle.js 出现如下错误: WARNING in configurationThe 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable default…