“$”是 IE 11 中 React 应用 运行 中的未定义错误
'$' is undefined error in react app running in IE 11
我如何摆脱错误“$”在 IE 11 中未定义?我正在使用 react with typescript (traget es2015)。 webpack 配置中的 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,我收到了字符串预期错误,这导致了另一个错误。
我如何摆脱错误“$”在 IE 11 中未定义?我正在使用 react with typescript (traget es2015)。 webpack 配置中的 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,我收到了字符串预期错误,这导致了另一个错误。