Nuxt JS 2.8.1 won't work in Internet Explorer 11 (IE11)

tanhernandez
0
tanhernandez
commented 3 months ago

Hello Guys! Is there anybody here that had successfully setup Nuxt JS 2.8.1 for IE 11?

Currently this is my nuxt config.

// nuxt.config.js

export default {

  // ... other settings

  /*
  ** Plugins to load before mounting the App
  */
  plugins: [
    '@/plugins/app-initialization'
  ],

  build: {

    /*
    ** You can exted babel config here.
    */
    babel: {
      presets ({isServer}, [preset, options]) {
        const r = [
          [
            preset, {
            buildTarget: isServer ? 'server' : 'client',
            ...options
          }]
          // [ Other presets ]
        ];

        // Override the options of the first preset.
        r[0][1].targets = {
          "browsers": ["> 1%", "last 2 versions", "ie >= 11", "not ie <= 8"],
          ie: 11
        };
        r[0][1].useBuiltIns = 'entry';

        return r;
      }
    },

    /*
    ** You can extend webpack config here
    */
    extend (config, ctx) {
    }
  }

}

And in my plugins/app-initialization.js, contains the manual polyfill for known Nuxt IE 11 issues.

// plugins/app-initialization.js

// To resolve the "Object doesn't support property or method 'from'" issue.
require('es6-object-assign/auto'); 

// To resolve the "'Promise' is undefined" issue.
require('es6-promise/auto');

// To resolve the "Object doesn't support property or method 'from'" issue.
if (!Array.from) Array.from = require('array-from');

// To resolve the "'Symbol' is undefined" issue.
require('es6-symbol/implement');

Now another problem came up which is I have no idea where is coming from. It's having an error that says "Object expected".

2019-06-27 16_35_20-.png

I've checked using IE Debugger and seems that it's happening under consola.browser codes.

2019-06-27 16_38_25-.png

2019-06-27 16_37_39-.png

Is there anyway to solve this "Object expected" issue? Thanks in advance for the help.

0
Timkor
6
Timkor
commented 3 months ago

Try npm run build and npm run start.

0
tanhernandez
0
tanhernandez
commented 2 months ago

@Timkor Seems by doing that, it just hides the error but not really resolving it. Would you happen to know the cause of it?

0
Informations
Question โ€ข Unresolved
#c9423 - Created 3 months ago