[英]SCRIPT1010: Expected identifier Error when running React app in IE11
[英]'$' is undefined error in react app running in IE 11
我如何擺脫錯誤 '$' 在 IE 11 中未定義? 我正在使用與打字稿(traget es2015)的反應。 webpack config 中的 Babel 配置如下所示
test: /\.(tsx|ts)$/,
loader: "awesome-typescript-loader",
exclude: /node_modules/,
options: {
"useBabel": true,
"babelOptions": {
"babelrc": false, /* Important line */
"presets": [
'@babel/preset-env',
"@babel/preset-react"
],
"plugins": [
[
"@babel/plugin-transform-classes", { "loose": true }
],
[
"@babel/plugin-transform-regenerator", { "asyncGenerators": false, "generators": false, "async": false }
],
[
"@babel/plugin-transform-parameters"
],
[
"@babel/plugin-transform-block-scoping"
],
[
"@babel/plugin-transform-typeof-symbol"
]
]
},
"babelCore": "@babel/core"
}
問題出在 googleapi 地圖腳本中。 由於 polyfill,我收到了一個字符串預期錯誤,這導致了另一個錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.