项目作者: shaodahong

项目描述 :
Based on html-webpack-plugin inline your resources
高级语言: JavaScript
项目地址: git://github.com/shaodahong/html-webpack-inline-assets-plugin.git


html-webpack-inline-assets-plugin

Based on html-webpack-plugin inline your resources

Improve the effect of html-webpack-plugin, the resources inline to html

Installation

  1. $ npm install --save-dev html-webpack-inline-assets-plugin

Basic Usage

  1. 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

  1. plugins: [
  2. new HtmlWebpackPlugin(),
  3. new HtmlWebpackInlineAssetsPlugin({
  4. head: '.(js|css)$',
  5. body: '.(js|css)$',
  6. })
  7. ]

other

This plugin is modified from html-webpack-inline-source-plugin