0

Использую связку gulp + wabpack(wabpack-stream) + babel 7.

IE11 ругается на class. Полагаю babel попросту не отработал. До этого с babel не работал, не могу понять что не так.

ИЕ 11

Настройки wabpack:

module: {
    rules: [
      {
        test: /\.js?$/,
        include: [path.resolve(__dirname, "./src/assets/js")],
        loader: "babel-loader"
      }
    ]
  }

.babelrc:

{
  "presets": ["@babel/preset-env"]
}

package.json:

"browserslist": [
    "last 2 version",
    "> 1%",
    "IE 10"
  ],
"devDependencies": {
    "@babel/core": "^7.4.3",
    "@babel/preset-env": "^7.4.3",
    "babel-loader": "^8.0.5",
    "webpack": "^4.29.6",
    "webpack-stream": "^5.2.1"
  },

1 ответ 1

0

IE не поддерживает определение классов https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Classes

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.