How to config Nuxt.js runing on ie 11

Viewed 605

I using Nuxt.js @ v2.13.2 and I try to config my project working with ie 11

The doc say:

The default targets of @nuxt/babel-preset-app are ie: '9' in the client build, and node: 'current' in the server build.

Here is my nuxt.config.js

build: {
    babel: {
      presets({ isServer }, [ preset, options ]) {
        // change options directly
        options.buildTarget = 'client'
        options.targets = {
          ie: 11,
        }
      }
    }
}

And my pages

import Amplify from 'aws-amplify';
import awsconfig from './aws-exports';

Amplify.configure(awsconfig);

But it not working in 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

How to do that thank.

1 Answers
Related