Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ant-tool/html-webpack-hashfix-plugin
Webpack plugin for repath assets with hash in outputs multiple html
https://github.com/ant-tool/html-webpack-hashfix-plugin
Last synced: 5 days ago
JSON representation
Webpack plugin for repath assets with hash in outputs multiple html
- Host: GitHub
- URL: https://github.com/ant-tool/html-webpack-hashfix-plugin
- Owner: ant-tool
- Created: 2017-01-18T03:29:18.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-20T10:34:47.000Z (almost 8 years ago)
- Last Synced: 2024-10-31T18:58:32.007Z (12 days ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 2
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
Awesome Lists containing this project
README
# html-webpack-hashfix-plugin
[![NPM version](https://img.shields.io/npm/v/html-webpack-hashfix-plugin.svg?style=flat)](https://npmjs.org/package/html-webpack-hashfix-plugin)
[![Build Status](https://img.shields.io/travis/ant-tool/html-webpack-hashfix-plugin.svg?style=flat)](https://travis-ci.org/ant-tool/html-webpack-hashfix-plugin)
[![Coverage Status](https://img.shields.io/coveralls/ant-tool/html-webpack-hashfix-plugin.svg?style=flat)](https://coveralls.io/r/ant-tool/html-webpack-hashfix-plugin)
[![NPM downloads](http://img.shields.io/npm/dm/html-webpack-hashfix-plugin.svg?style=flat)](https://npmjs.org/package/html-webpack-hashfix-plugin)
[![Dependency Status](https://david-dm.org/ant-tool/html-webpack-hashfix-plugin.svg)](https://david-dm.org/ant-tool/html-webpack-hashfix-plugin)Webpack plugin for repath assets with hash in outputs multiple html
## Features
* replace multiple html ressets with hash## Installation
```bash
$ npm i --save html-webpack-hashfix-plugin
```## Usage
Add new plugin instance to your `webpack` config
```javascript
import HtmlHashFix from 'html-webpack-hashfix-plugin';const compiler = webpack({
plugins: [
new HtmlHashFix({
separator: '-',
prefixPath: '',
})
]
});
```## Configuration
The plugin accepts the following options:- separator: separator of fileName and hashCode; 文件名和 hash 值的分隔符。
- prefixPath: add prefixPath for html assets path; 可以给 html 引用的静态文件自定义前缀路径。### License
MIT## other
- webpack chunkhash code in local are not as same as travis-ci, you can run test case in local.