# lowhtml-loader

> combine html for webpack

Latest version **2.1.6** (published 2016-11-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install lowhtml-loader
pnpm add lowhtml-loader
yarn add lowhtml-loader
bun add lowhtml-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.6 |
| Published | 2016-11-17 |
| First published | 2016-11-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hzl |
| Maintainers | givemefive |
| Keywords | html-loader-webpack, html, webpack |

## Links

- npm: https://www.npmjs.com/package/lowhtml-loader
- Repository: https://github.com/itboke/lowhtml-loader
- Homepage: https://github.com/itboke/lowhtml-loader#readme
- Issues: https://github.com/itboke/lowhtml-loader/issues
- npm.io page: https://npm.io/package/lowhtml-loader

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 2.1.6 (latest) — 2016-11-17
- 2.1.5 — 2016-11-17
- 2.1.4 — 2016-11-17
- 2.1.3 — 2016-11-15
- 2.1.2 — 2016-11-15
- 2.1.1 — 2016-11-15
- 2.1.0 — 2016-11-14
- 2.0.0 — 2016-11-14
- 1.0.0 — 2016-11-14

## README

# lowhtml-loader

##安装
```shell
npm install lowhtml-loader
```

##日志
* 2.1.1 完善readme.md 说明
* 2.1.2 代码的参数更正
* 2.1.3 完善构建html文件中的css,js文件的路径,添加配置说明
* 2.1.4 构建html是否压缩,loader配置压缩参数

##webpack-lowhtml?参数=参数值配置
* static 静态资源的域的链接目录 如//localhost:3000/dist/css/xx.css
* defaultStatic 静态资源的相对目录,如/dist/css/xx.css
* publicPath 静态资源的CDN目录,如 http://static.xx.com/css/xx.css
* minify {bool}
* 提示：当都没有填写的时候,静态文件中的css,js引用/dist/目录下,建议填写static或者defaultStatic
``` javascript
module:{
    // 加载器
    loaders: [
        { test: /\.(html)$/, loader: 'lowhtml?static=localhost:3000/dist&defautlStatic=dist&publicPath=http://127.0.0.1/dist&minify=true'}
    ]
}
```

##当需要webpack构建html文件到生产或者开发目录下
* 例如demo目录src下的首页index.js文件对应的就是inde.html文件
* 在index.js引入当前的业务html文件,让webpack构建
``` js
import '../html/index.html';
```

##功能说明
* @@include 可以帮你构建公共的头部文件
* @@css     可以帮你构建index.css等文件路径
* @@js      可以帮你构建index.js等文件路径
``` html
<!DOCTYPE html>
<html lang="en">
<head>
    @@include('./_common/head.html')
    @@css('index.css')
</head>
<body>
    <h1 id="app"></h1>
    @@js("vue.min.js,index.js")
    @@include('./_common/foot.html')
</body>
</html>
```

---
_Source: https://npm.io/package/lowhtml-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
