Как исправить эту ошибку? Эта ошибка возникает при использовании компонента Navigator из библиотеки «response-onsenui».
Error: Module parse failed: Unexpected token (330:6)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| return (
> <ons-navigator { ...attrs } ref={(navi) => { this._navi = navi; }}>
| {pages}
| </ons-navigator>
Часть кода Webpack.config.js:
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
include: path.resolve(__dirname, 'src'),
use: [{
loader: 'babel-loader',
options: {
presets: ['react', 'env'],
plugins: [
'react-hot-loader/babel',
'transform-class-properties',
'transform-object-rest-spread'
]
}
}]
}
...