Static GitHub Issues

[2449] How to define webpack on config.nuxt.js

prev: How to use nuxt in koa-router or express-router?
next: Multiple nuxt apps in 1 main modules/library/vendor

Hi,

I need to define webpack but I am just looking what is the best way to define it... cuz nuxt config is a little bit weird for me even though I am loving it and I am building my app on it.

Following these instructions here: https://gist.github.com/rvanzon/6028e884f6735c41125fb2d140143102 where I wanted to reduce chunk size.

So I added this line: if (!this.dev) { config.plugins.push(new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 3 })) }

And now I am getting error that webpack is not defined.

Thnx in advance for any help.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2124">#c2124</a>)</em></sub></div>