https://github.com/shaodahong/html-webpack-inline-assets-plugin
Based on html-webpack-plugin inline your resources
https://github.com/shaodahong/html-webpack-inline-assets-plugin
html-webpack-inline-assets-plugin html-webpack-plugin webpack webpack2 webpack3
Last synced: 2 months ago
JSON representation
Based on html-webpack-plugin inline your resources
- Host: GitHub
- URL: https://github.com/shaodahong/html-webpack-inline-assets-plugin
- Owner: shaodahong
- Created: 2017-06-26T02:23:17.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T08:31:49.000Z (over 2 years ago)
- Last Synced: 2025-08-09T08:19:23.156Z (8 months ago)
- Topics: html-webpack-inline-assets-plugin, html-webpack-plugin, webpack, webpack2, webpack3
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# html-webpack-inline-assets-plugin
Based on html-webpack-plugin inline your resources
Improve the effect of [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin), the resources inline to html
## Installation
```bash
$ npm install --save-dev html-webpack-inline-assets-plugin
```
## Basic Usage
```
var HtmlWebpackInlineAssetsPlugin = require('html-webpack-inline-assets-plugin');
```
We need to pass the parameters `head` or `body` to tell us which resources are needed inline to html, the parameters you need to pass a **regular expression**
```
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackInlineAssetsPlugin({
head: '.(js|css)$',
body: '.(js|css)$',
})
]
```
## other
This plugin is modified from [html-webpack-inline-source-plugin](https://github.com/DustinJackson/html-webpack-inline-source-plugin)