Is there a problem with webpack configuration in nuxt? O_0?

the plug-in vuex-persist is used in the development to store the data in vuex to localStorage.

suddenly found that this plug-in will report an error in IE.

script 1002 this error.

google said for a moment that the problem was caused by the failure to convert the ES6 syntax.

after reading the documentation of nuxt, you can expand the configuration of webpack, but the project has already been built by Babel

what can I do to make the code in this plug-in successful Babel

how to configure this item.

 build: {

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

report an error as shown in figure


try the following

"start": "cross-env NODE_ENV=production node server/index.js-- exec babel-node",

then create a new file .babelrc (point cannot be omitted)
add

to the file
{
    "presets": ["es2015"]
}

then go to the terminal to execute
npm I babel-core babel-preset-es2015 babel-cli


your description is insufficient, maybe the actual problem is not babel.

add the wrong screenshot.

Menu