https://github.com/gssify/html-insert-webpack-plugin
Inject script and style to html by custome rules
https://github.com/gssify/html-insert-webpack-plugin
Last synced: 10 months ago
JSON representation
Inject script and style to html by custome rules
- Host: GitHub
- URL: https://github.com/gssify/html-insert-webpack-plugin
- Owner: gssify
- License: mit
- Created: 2018-03-06T11:18:55.000Z (over 8 years ago)
- Default Branch: dev
- Last Pushed: 2018-03-08T02:37:28.000Z (over 8 years ago)
- Last Synced: 2025-08-21T19:21:46.106Z (11 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Inject extension for the HTML Webpack Plugin
========================================
[](http://badge.fury.io/js/html-insert-webpack-plugin) [](https://david-dm.org/gssify/html-insert-webpack-plugin) [](https://travis-ci.org/gssify/html-insert-webpack-plugin) [](https://github.com/Flet/semistandard)
This is an extension plugin for the [webpack](http://webpack.github.io) plugin [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) - a plugin that simplifies the creation of HTML files to serve your webpack bundles.
Installation
------------
You must be running webpack on node 0.12.x or higher
Install the plugin with npm:
```shell
$ npm install --save-dev html-insert-webpack-plugin
```
Basic Usage
-----------
Require the plugin in your webpack config:
```javascript
var HtmlInsertWebpackPlugin = require('html-insert-webpack-plugin');
```
Add the plugin to your webpack config as follows:
```javascript
plugins: [
new HtmlWebpackPlugin(),
new HtmlInsertWebpackPlugin()
]
```
The above configuration will actually do nothing due to the configuration defaults.