0.0.2 • Published 6 years ago
html-webpack-inject-assets-plugin v0.0.2
html-webpack-inject-assets-plugin
A simple webpack plugin using html-webpack-plugin's hook to inject assets.
Installation
Install the plugin with npm:
$ npm install --save-dev html-webpack-inject-assets-plugin
Basic Usage
Require the plugin in your webpack config:
var HtmlWebpackInjectAssetsPlugin = require('html-webpack-inject-assets-plugin');
Add the plugin to your webpack config as follows:
plugins: [
new HtmlWebpackPlugin({inject: false}),
new HtmlWebpackInjectAssetsPlugin()
]
The above configuration will try to find the slots(default to !%css slot%!
and !%js slot%!
) in the html generated by html-webpack-plugin, and replace them with the assets on present.