Поскольку стрелка жиров теперь широко поддерживается браузером, я бы предпочел не переносить их. Тем не менее, webpack выдает эту ошибку в методе жирной стрелки. Как я могу решить?
ERROR in ./src/myclass.js 59:15
Module parse failed: Unexpected token (59:15)
File was processed with these loaders:
* ../../node_modules/string-replace-loader/index.js
You may need an additional loader to handle the result of these loaders.
| * @return {Array} The list of results
| **/
> getResults = () => this.results;
|
| /**
Моя конфигурация веб-пакета
module.exports = {
entry: glob_entries("./src/**/*.js"),
output: {
filename: "[name].js",
path: path.resolve(__dirname, "dist")
},
{
test: /\.js$/,
loader: "string-replace-loader",
options: {
multiple: [
{
search: "/node_modules/countup.js/dist/countUp.min.js",
replace: "countup.js"
}
]
}
}
}