Skip to content

Commit

Permalink
should be output.html
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist authored Dec 5, 2018
1 parent 2e4c9f7 commit f48fb77
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,48 @@ const DefaultFileNames = {

Bundle target.

### output.html

Customize generated HTML file. This is only available in `iife` and `umd` format.

The options you provide here will also be available under `html` variable in your HTML file, so you can access them using EJS syntax:

```html
<title><%= html.title %></title>
```

#### output.html.title

- Type: `string`
- Default: `pkg.title`
- CLI: `--html.title <title>`

Document title.

#### output.html.filename

- Type: `string`
- Default: `index.html`
- CLI: `--html.filename <filename>`

The filename of generated HTML file.

#### output.html.template

- Type: `string`
- Default: `poi/lib/webpack/default-template.html`
- CLI: `--html.template <template>`

The template file for generated HTML file, supporting EJS syntax.

#### output.html.inject

- Type: `boolean`
- Default: `true`
- CLI: `--[no-]html.inject`

Automatically inject webpack assets to `<head>` and `<body>`.

## babel

### babel.jsx
Expand Down Expand Up @@ -178,48 +220,6 @@ interface LoaderOptions {
}
```

## html

Customize generated HTML file.

The options you provide here will also be available under `html` variable in your HTML file, so you can access them using EJS syntax:

```html
<title><%= html.title %></title>
```

### html.title

- Type: `string`
- Default: `pkg.title`
- CLI: `--html.title <title>`

Document title.

### html.filename

- Type: `string`
- Default: `index.html`
- CLI: `--html.filename <filename>`

The filename of generated HTML file.

### html.template

- Type: `string`
- Default: `poi/lib/webpack/default-template.html`
- CLI: `--html.template <template>`

The template file for generated HTML file, supporting EJS syntax.

### html.inject

- Type: `boolean`
- Default: `true`
- CLI: `--[no-]html.inject`

Automatically inject webpack assets to `<head>` and `<body>`.

## assets

### assets.inlineImageMaxSize
Expand Down Expand Up @@ -274,4 +274,4 @@ interface Opts {

// Some plugin might supply custom opts for creating customized webpack config
// e.g. creating one for client bundle and the other one for server bundle
```
```

0 comments on commit f48fb77

Please sign in to comment.