Skip to content

Instantly share code, notes, and snippets.

@novaknole
Created January 30, 2020 15:23
Show Gist options
  • Save novaknole/ffa9a82989b0ac5736dfc16cb8cbcb43 to your computer and use it in GitHub Desktop.
Save novaknole/ffa9a82989b0ac5736dfc16cb8cbcb43 to your computer and use it in GitHub Desktop.
class TestPlugin {
apply(compiler) {
compiler.hooks.afterEmit.tap('TestPlugin', (compilation) => {
let options = {}; // some options i will put here
let plugin = new SomePlugin(); // this will be webpack's plugin, not mine
compiler.apply(plugin);
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment