vue.js - 如何配置在 ie 11 上运行的 Nuxt.js
问题描述
我使用Nuxt.js @ v2.13.2
并尝试配置我的项目ie 11
医生说:
The default targets of @nuxt/babel-preset-app are ie: '9' in the client build, and node: 'current' in the server build.
这是我的nuxt.config.js
build: {
babel: {
presets({ isServer }, [ preset, options ]) {
// change options directly
options.buildTarget = 'client'
options.targets = {
ie: 11,
}
}
}
}
还有我的页面
import Amplify from 'aws-amplify';
import awsconfig from './aws-exports';
Amplify.configure(awsconfig);
但它不工作ie 11
[object Error]{description: "Syntax error", message: "Syntax error", name: "SyntaxError", number: -2146827286, stack: "SyntaxError...", Symbol(amplify_default)_i.icdaor5bqh3: undefined, Symbol(extensions)_k.icdaor5bqh3: undefined, Symbol(observable)_j.icdaor5bqh3: undefined, Symbol(react.element)_h.icdaor5bqh3: undefined
怎么做谢谢。
解决方案
据我所知,问题在于 Symbol polyfill 不支持跨领域的原生功能。
推荐阅读
- spring - 实践中的客户端负载平衡似乎与服务器端负载平衡几乎相同。是这样吗?
- javascript - 无法在 Azure Web App Linux 或 Windows 上访问 NodeJS 站点
- ios - Swift 4 - 委托问题,UITextField 返回 nil
- python - Django如何序列化和验证外部xml数据
- node.js - 如何在不重新启动 nodeJS 服务器的情况下动态获取新的智能合约编译的 ABI?
- python - 四位数的字符串数字到两位数的字符串
- javascript - 不能在多选中将值设置为字符串而不是对象
- mysql - 游标或处理程序声明后的变量或条件声明 SQL 语句 (mysql)
- interpolation - Terraform - 根据变量创建 cloudwatch 计划表达式 - 预期表达式但找到“*”
- mysql - NodeJS MySQL concat 查询以及来自许多模型查询对一个控制器调用的响应