Skip to content

Commit e26dd35

Browse files
committed
Added option productionOnly
1 parent 67ec5ec commit e26dd35

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ export default class {
4949
jsdocConfig: {},
5050
jsdocHtmlConfig: {},
5151
jsdocTsdConfig: {},
52+
productionOnly: true,
5253
...options,
5354
}
5455
}
5556

5657
apply(compiler) {
58+
if (this.options.productionOnly && compiler.options.mode !== "production") {
59+
return
60+
}
61+
5762
compiler.hooks.afterPlugins.tap(webpackId, () => {
5863
compiler.hooks.publishimoGeneratedPkg?.tapPromise(webpackId, async publishimoResult => {
5964
this.publishimoPkg = publishimoResult.generatedPkg

0 commit comments

Comments
 (0)