https://github.com/gssify/html-webpack-replace-var-plugin
This is an extension plugin for the webpack plugin html-webpack-plugin - a plugin that can replace variables in server template
https://github.com/gssify/html-webpack-replace-var-plugin
Last synced: 10 months ago
JSON representation
This is an extension plugin for the webpack plugin html-webpack-plugin - a plugin that can replace variables in server template
- Host: GitHub
- URL: https://github.com/gssify/html-webpack-replace-var-plugin
- Owner: gssify
- License: mit
- Created: 2017-05-12T08:03:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-12T09:04:55.000Z (about 9 years ago)
- Last Synced: 2025-08-09T08:19:24.456Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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:
```bash
$ npm install html-webpack-replace-var-plugin
```
## Basic Usage
Require the plugin in your webpack config:
```js
var HtmlWebpackReplaceVarPlugin = require('html-webpack-replace-var-plugin');
```
Add the plugin to your webpack config as follows:
```js
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackReplaceVarPlugin()
]
```
The above configuration will actually do nothing due to the configuration defaults.
you can set options like this:
```js
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackReplaceVarPlugin({
'<%': '{{',
'%>': '}}'
})
]
```