mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
17 lines
305 B
JavaScript
17 lines
305 B
JavaScript
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
|
|
},
|
|
}
|