next.js/test/integration/broken-webpack-plugin/next.config.js
next.config.js17 lines305 B
class BrokenPlugin {
  apply(compiler) {
    compiler.hooks.watchRun.tapPromise('BrokenPlugin', async () => {
      throw new Error('oops')
    })
  }
}

module.exports = {
  webpack(config, { isServer }) {
    if (!isServer) {
      config.plugins.push(new BrokenPlugin())
    }
    return config
  },
}
Quest for Codev2.0.0
/
SIGN IN