reactjs - '$' 是在 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,我收到了一个字符串预期错误,这导致了另一个错误。
推荐阅读
- php - 转换为完整的 unicode 字符串
- python - 模拟 subprocess.Popen 与字典作为标准输出
- javascript - Webdriver io,文件上传使用输入类型=“文件”
- abap - ASSIGN 因调试器路径中的变量而失败
- android - 使用 ARM ABI 模拟 Android 1.6 Donut
- performance - 定义所有新语法会损害 Scheme、Racket 的性能吗?
- c# - 如何从 appsettings.json 读取 AWS RegionEndpoint?
- android - 为什么使用 NDK 不能存在不同的 stl 实现?
- swift - 如何在swift中制作带有背景颜色的交叉标签?
- sql - 有没有什么可能的方法可以只做大写的“元音”表单列名=“last_name”?