# html-webpack-import-static-pages

> Dynamically import static HTML pages for HTMLWebpackPlugin

Latest version **1.1.2** (published 2019-01-27) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install html-webpack-import-static-pages
pnpm add html-webpack-import-static-pages
yarn add html-webpack-import-static-pages
bun add html-webpack-import-static-pages
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2019-01-27 |
| First published | 2018-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | wklsh |
| Maintainers | wklsh |
| Keywords | webpack, HTMLWebpackplugin, static, html, pages |

## Links

- npm: https://www.npmjs.com/package/html-webpack-import-static-pages
- Repository: https://github.com/wklsh/html-webpack-import-static-pages
- Homepage: https://github.com/wklsh/html-webpack-import-static-pages#readme
- Issues: https://github.com/wklsh/html-webpack-import-static-pages/issues
- npm.io page: https://npm.io/package/html-webpack-import-static-pages

## Dependencies (1)

- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^4.0.0-alpha.2

## 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

- 1.1.2 (latest) — 2019-01-27
- 1.1.1-a — 2018-10-13
- 1.1.1 — 2018-10-13
- 1.1.0-a — 2018-10-08
- 1.1.0 — 2018-10-08
- 1.0.1-b — 2018-09-24
- 1.0.1-a — 2018-09-24
- 1.0.1 — 2018-09-24
- 1.0.0 — 2018-09-24

## README

# HTML webpack import static HTML pages

Dynamically import static HTML pages for HTMLWebpack plugin without having to manually specify every path within your project.

This is an extension to the [webpack](http://webpack.github.io) plugin [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin).

## Installation

```
npm install -D html-webpack-import-static-pages
```

Plugin requires [webpack](http://webpack.github.io) (v4 or higher), and [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) (v4 or higher - installed as a dependency).

## Basic Usage

```jsx
const HtmlWebpackImportStaticPages = require("html-webpack-import-static-pages");

module.exports = {
	entry: {
		app: path.resolve(__dirname, "src/js/index.js"),
		landing: path.resolve(__dirname, "src/js/views/landing/page-landing.js"),
	},
}

...

plugins: [
    new HtmlWebpackImportStaticPages({
	path: path.resolve(__dirname, 'dev/html'),
        blacklist: ['HTMLPageToBlacklist'],
        chunkAssign: {
            HTMLPageName: ['app', 'landing']
        }
    }),

...
]
```

## Options
|Name|Type|Requirements|Description|
|:--:|:--:|:-----:|:----------|
|path|{pathname}|optional|A path to search for `.html` files - Defaults to `webpack.context/src`|
|blacklist|[HTMLPageName]|optional|Specify HTML files to be ignored by HtmlWebPackPlugin|
|chunkAssign|HTMLPageName: [chunk]|optional|Assign chunks to be included into specific .html pages|



## Version

v1.1.x

- Added custom paths

v1.0.x

- initial release

---
_Source: https://npm.io/package/html-webpack-import-static-pages · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
