Skip to content

Commit 2c1e706

Browse files
committed
[OPTIONS] Restore plugins option
1 parent 8a5b6c8 commit 2c1e706

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ webWorkerLoader({
186186
loadPath?: string, // This option is useful when the worker scripts need to be loaded from another folder.
187187
// Default: ''
188188

189+
plugins?: Array, // An array of extra plugins to use while compiling the worker code. Used to apply
190+
// transformations to the worker code and not the main code (i.e. minify)
191+
// NOTE: these plugins be added to the rollup process on top of the plugins in the
192+
// default configuration.
193+
// Default: []
194+
189195
skipPlugins?: Array // Plugin names to skip for web worker build
190196
// Default: [ 'liveServer', 'serve', 'livereload' ]
191197
})

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const defaultConfig = {
2323
external: undefined,
2424
extensions: [ '.js' ],
2525
outputFolder: '',
26+
plugins: [],
2627
skipPlugins: [
2728
'liveServer',
2829
'serve',

src/plugin/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function optionsImp(state, config, options) {
1111
}
1212
plugins.push(plugin);
1313
});
14+
plugins.push(...config.plugins);
1415
state.options.plugins = plugins;
1516

1617
const cwd = process.cwd();

0 commit comments

Comments
 (0)