1.0.0-beta.0 • Published 8 years ago

@glitchapp/remove-junks-plugin v1.0.0-beta.0

Weekly downloads
3
License
MIT
Repository
-
Last release
8 years ago

Remove Junks Plugin

npm (scoped) Travis npm

This package is part of Glitch project

A webpack plugin to remove junk chunk's files

Installation

$ npm install @glitchapp/remove-junks-plugin

Usage

// webpack.config.js
const { RemoveJunksPlugin } = require('@glitchapp/remove-junks-plugin')

module.exports = {
  entry: {
    app: './app.js'
  },
  ...
  output: {
    filename: 'bundle.js'
  },
  ...
  plugins: [
    // This removes 'bundle.js'
    // NOTE: It works even if a chunk has multiple output files (i.e. if you use a plugin like extract-text-webpack-plugin)
    new RemoveJunksPlugin(['app'])
  ]
}

Options

new RemoveJunksPlugin(chunks)
NameTypeDescription
chunks (required)string[]A lists of all chunk names you want to remove

Contributing

We value and appreciate your help, please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Running the tests

$ npm test

Acknowledgments

Inspired by the awesome work of Alex Lu in their suppress-chunks-webpack-plugin webpack plugin.

License

This project is licensed under the MIT License terms

1.0.0-beta.0

8 years ago

1.0.0-alpha.1

8 years ago

1.0.0-alpha.0

8 years ago