1.0.1 • Published 7 years ago

html-webpack-replace-var-plugin v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

html-webpack-replace-var-plugin npm.io 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({
    '<%': '{{',
    '%>': '}}'
  })
]