慕粉007羊
2019-05-27 10:06
修饰器报错
Module parse failed: Unexpected character '@' (50:4)
You may need an appropriate loader to handle this file type.
webpack.config.js文件也配置了
rules: [{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['env','react'],
plugins: ['transform-decorators-legacy','transform-class-properties']
}
}
}]index.js
class Store{
@observable array = [];}
请问还会报错的原因是什么
mobx入门基础教程
18821 学习 · 57 问题