vue.js - 如何配置运行在 ie 11 上的 Nuxt.js

标签 vue.js vuex nuxt.js aws-amplify

我使用 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/

相关文章:

modal-dialog - 使用 vue.js 2.0 打开引导模式

javascript - fetch api .then 调用代码先于服务 .then 执行,这会导致未定义的数据

vue.js - 在计算中返回 getters 创建一个循环

vue.js - vuetify 突然显示奇怪的图标

javascript - 我如何在我的 nuxt vps 上使用 laravel csrf token

javascript - 从文件夹导入和导出所有 .vue 文件

javascript - Bootstrap 弹出内容中的 Vue js v-model

vue.js - 使用 nuxtJS + Vue2-Editor 时如何解决文档未定义错误?

vue.js - 为什么Vuex的action会返回一个promise<pending>?

firebase - Nuxt SSR 身份验证防护与 Firebase 身份验证