yangmingshan / remove-source-webpack-plugin

A plugin for webpack to remove the source that are not needed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remove-source-webpack-plugin

A plugin for webpack to remove the source that are not needed. Can be used with html-webpack-inline-source-plugin to remove inlined source.

Installation

You can install it via yarn or npm.

$ yarn add remove-source-webpack-plugin --dev
$ npm install remove-source-webpack-plugin --save-dev

Usage

Require the plugin in your webpack config:

const RemoveSourceWebpackPlugin = require('remove-source-webpack-plugin');

Add the plugin to your webpack config as follows:

plugins: [
  new RemoveSourceWebpackPlugin(/runtime.*\.js$/) // array is also accepted
]

Demo

https://github.com/yangmingshan/react-demo

License

MIT

About

A plugin for webpack to remove the source that are not needed

License:MIT License


Languages

Language:JavaScript 100.0%