Cтолкнулся с такой проблемой: объявление класса со свойством (приватным или нет - не важно)
'use strict';
class Mult { value = 2;
constructor(int) {
this.int = int; }
double() { return this.int * this.value; } }
let val = new Mult(5);
console.log(val.double())
приводит к ошибке
index.js:1 Uncaught Error: Module parse failed: Unexpected token (4:8)
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
|
| class Mult {
> value = 2;
|
| constructor(int) {
at eval (index.js:1)
at Object../app/js/index.js (bundle.js:96)
at __webpack_require__ (bundle.js:20)
at bundle.js:84
at bundle.js:87
Сборка: gulp + webpack. Что это значит? Webpack не поддерживает классы ES6?