babel plugins nuxt 1

babel plugins nuxt

module.exports = {
  mode: 'universal',

  /*
  ** a few other things like head, css, modules...
  */

  build: {
      babel: {
        presets: ['what-you-need']
      }
  }
}

Here is what the above code is Doing:
1. We’re telling Nuxt to use the universal mode.
2. We’re telling Nuxt to use the babel-preset-what-you-need preset.

Now, let’s install the preset:

npm install –save-dev babel-preset-what-you-need

Similar Posts