npm.io
1.0.1 • Published 9 years ago

html-webpack-replace-var-plugin

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0
Stars
2

html-webpack-replace-var-plugin issues stars MIT

Replace variables extension for the HTML Webpack Plugin

This is an extension plugin for the webpack plugin html-webpack-plugin - a plugin that can replace variables in server template

Installation

Install the plugin with npm:

$ npm install html-webpack-replace-var-plugin

Basic Usage

Require the plugin in your webpack config:

var HtmlWebpackReplaceVarPlugin = require('html-webpack-replace-var-plugin');

Add the plugin to your webpack config as follows:

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

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

you can set options like this:

plugins: [
  new HtmlWebpackPlugin(),
  new HtmlWebpackReplaceVarPlugin({
    '<%': '{{',
    '%>': '}}'
  })
]