1.0.0 • Published 4 years ago

@ianwalter/exclude-assets-plugin v1.0.0

Weekly downloads
49
License
SEE LICENSE IN LI...
Repository
github
Last release
4 years ago

@ianwalter/exclude-assets-plugin

A html-webpack-plugin plugin to exclude certain assets from your HTML files

npm page CI

Installation

yarn add @ianwalter/exclude-assets-plugin

Usage

Here's an example of a stripped down Webpack configuation that excludes all JavaScript assets from the generated HTML file:

const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExcludeAssetsPlugin = require('@ianwalter/exclude-assets-plugin')

module.exports = {
  plugins: [
    new HtmlWebpackPlugin({
      template: 'app/pageTemplate.html',
      minify: isProd,
      excludeAssets: [/\.js/]
    }),
    new ExcludeAssetsPlugin()
  ]
}

License

Hippocratic License - See LICENSE

 

Created by Ian Walter