Skip to content

whiteGloom/remove-service-outputs-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Languages


What is it? [EN]

↓ To navigation | ↑ To languages

Remove-service-outputs-pluginWebpack ➦ plugin, that allows deleting service files generated after build.

Navigation

Instruction

Installation

To install the plugin, use command:

npm i -D whiteGloom/remove-service-outputs-plugin

↑ To navigation


Import

Common JS:

var removeServiceOutputsPlugin = require('remove-service-outputs-plugin').default;

ES6+:

import removeServiceOutputsPlugin from 'remove-service-outputs-plugin';

↑ To navigation


Usage

Creating of the plugin instance:

new removeServiceOutputsPlugin(...[chunkName, regexp]);

Arguments:

  • chunkName - type: string. To of the chunk to process.
  • regexp - type: RegExp. Selecting criteria.

↑ To navigation


Examples

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$/]);
    ]
}

↑ To navigation

End.

About

Webpack plugin that removes service outputs after build

Resources

License

Stars

Watchers

Forks

Packages

No packages published