↓ To navigation | ↑ To languages
Remove-service-outputs-plugin — Webpack ➦ plugin, that allows deleting service files generated after build.
- What is it? [EN]
- Navigation
- Instruction:
- Examples
To install the plugin, use command:
npm i -D whiteGloom/remove-service-outputs-plugin
Common JS:
var removeServiceOutputsPlugin = require('remove-service-outputs-plugin').default;
ES6+:
import removeServiceOutputsPlugin from 'remove-service-outputs-plugin';
Creating of the plugin instance:
new removeServiceOutputsPlugin(...[chunkName, regexp]);
Arguments:
- chunkName - type: string. To of the chunk to process.
- regexp - type: RegExp. Selecting criteria.
Will remove js output files of "second" and "third" entries.
Webpack config object:
{
entry: {
first: 'first.js',
second: 'second.js',
third: 'third.js'
},
output: {
path: './',
filename: [name].js
},
plugins: [
new removeServiceOutputsPlugin(['second', /.*\.js$/], ['third', /.*\.js$/]);
]
}