html-webpack-replace-var-plugin
v1.0.1
Published
replace variable in server template
Downloads
4
Maintainers
Readme
html-webpack-replace-var-plugin
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({
'<%': '{{',
'%>': '}}'
})
]