@ianwalter/exclude-assets-plugin
v1.0.0
Published
A html-webpack-plugin plugin to exclude certain assets from your HTML files
Downloads
854
Readme
@ianwalter/exclude-assets-plugin
A html-webpack-plugin plugin to exclude certain assets from your HTML files
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