【发布时间】:2016-02-21 13:58:50
【问题描述】:
我的项目中的装饰器不起作用。我将此作为第一行 import 'babel-core/polyfill' 但仍然有错误
Module build failed: SyntaxError: .../index.js: Unexpected token
【问题讨论】:
-
您是否尝试将
{"stage": 0}添加到.babelrc? -
不,我通过 webpack.config.js 设置了 babel-loader
标签: decorator ecmascript-6 webpack babeljs