Static GitHub Issues

[2578] Can we add a webpack plugin inside a nuxt module?

prev: wasm files not served as application/wasm in nuxt dev
next: TypeError: logError is not a function
// inside nuxt.config.js, we can extend & add
{
  ...
  build: {
    extend(config) {
      // extend webpack config
    },
    plugins: [
      // add webpack plugins
    ]
  }
  ...
}
// my-module.js
module.exports = function (moduleOptions) {
  this.extendBuild(config => {
      ...
  })
  // can we add webpack plugins here somehow?
}
<!--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/c2244">#c2244</a>)</em></sub></div>