html-webpack-inline-lzma-plugin

0.1.6 • Public • Published

Inline Source as LZMA extension for the HTML Webpack Plugin

Enhances html-webpack-plugin functionality by adding the {inlineSource: 'regex string'} option.

This is an extension plugin for the webpack plugin html-webpack-plugin. It allows you to embed javascript and css source inline.

Installation

You must be running webpack on node 4 or higher

Install the plugin with npm:

$ npm install --save-dev html-webpack-inline-lzma-plugin

Basic Usage

Require the plugin in your webpack config:

var HtmlWebpackInlineLzmaPlugin = require('html-webpack-inline-lzma-plugin');

Add the plugin to your webpack config as follows:

plugins: [
  new HtmlWebpackPlugin(),
  new HtmlWebpackInlineLzmaPlugin()
]  

The above configuration will actually do nothing due to the configuration defaults.

When you set inlineSource to a regular expression the source code for any javascript or css file names that match will be embedded inline in the resulting html document.

plugins: [
  new HtmlWebpackPlugin({
		inlineSource: '.(js|css)$' // embed all javascript and css inline
	}),
  new HtmlWebpackInlineLzmaPlugin()
]  

Package Sidebar

Install

npm i html-webpack-inline-lzma-plugin

Weekly Downloads

0

Version

0.1.6

License

MIT

Unpacked Size

17.7 kB

Total Files

6

Last publish

Collaborators

  • powerfulpony