0

When i'm generating the project with nuxtjs, the code is compressed.

I would like to know if it's possible to generate a correct indenting code ?

Thanks

1 Answers1

4

The minimization is done by Webpack. You can change the Webpack config in your nuxt.config.js file under the extend option of the build property. To disable minimization, you need to set config.optimization.minimize to false.

For example, in your nuxt.config.js file:

  build: {
    /*
    ** You can extend webpack config here
    */
    extend(config, ctx) {
        config.optimization.minimize = false;
    }
  },

You probably wouldn't want to do this in production though. Minimization is a standard practice to help reduce the size of your JavaScript files.

D Malan
  • 10,272
  • 3
  • 25
  • 50