我使用 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 不支持也不能支持跨领域的 native 功能。
更多详情:https://github.com/zloirock/core-js/issues/834
关于vue.js - 如何配置运行在 ie 11 上的 Nuxt.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62669009/