File size: 305 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
  },
}