我试图在es6 react代码中使用“上下文”,但在捆绑时,我遇到了这个错误
export default class Layout extends React.Component {
static contextTypes = {
LayoutURL : React.PropTypes.string
};
constructor(props, context) {
super(props, context);
this.state = {
}
}
}
“模块生成失败:TypeError:\u jsTokens2.default.matchToToken不是函数”
PFB我的网页代码(我在resolve中添加了es6,但错误仍然存在)我的网页版本为“^1.13.0”
module.exports = {
 entry: './main.js',
 output: { path: __dirname, filename: 'bundle.js' },
devServer: {
inline: true,
port: 8085
},
 module: {
   loaders: [
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
}
]
 },
resolve: {
extensions: ['', '.js', '.jsx','.es6']
},
};