assets-inline-plugin
v1.0.3
Published
an extension plugin for the webpack plugin html-webpack-plugin
Readme
An extension for the html-webpack-plugin
This is an extension plugin for the webpack plugin html-webpack-plugin. It allows you to embed javascript and css source assets inline.
Language
Installation
Install the plugin with npm:
$ npm install --save-dev assets-inline-pluginBasic Usage
Require the plugin in your webpack config:
const HtmlInlinePlugin = require('assets-inline-plugin');Add the plugin to your webpack config as follows:
plugins: [
new HtmlWebpackPlugin(),
new HtmlInlinePlugin()
]Options
The available options are:
inline:booleanorregexporobjectDetermines how to inline asserts. The following option are all vaild.
inline: trueinline: /\.(css|js)$/inline: { css: /\.css$/, js: /\.js$/ }inline: { css: true, js: true }
Default is
true.remove:booleanRemoves the inlined files. Default is
true.

