Unexpected character '@'
修飾器報(bào)錯(cuò)
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?=?[];
}
請問還會(huì)報(bào)錯(cuò)的原因是什么
2019-07-09
babel-loader的版本問題吧
https://github.com/beat-the-buzzer/mobx-todolist