webpack jsx Unexpected token:
配置loader
1 | { |
或者添加到 .babelrc文件
Failed at the node-sass@3.13.1 postinstall script
缺少python的编译环境,安装node-gyp和gym:
1 | npm install -g node-gyp |
Found bindings for the following environments: - Windws 64-bit with Node.js
Nodejs版本不兼容
添加async的时候webpack打包报错
安装async的解析插件
1 | npm install --save-dev babel-plugin-transform-async-to-generator |
添加到 .babelrc文件
1 | {"plugins": ["transform-async-to-generator"]} |
安装后运行可能再次报错:regeneratorRuntime is not defined
安装babel-polyfill
1 | npm install --save-dev babel-polyfill |
在webpack配置文件添加
1 | require("babel-polyfill"); |