Skip to content

Commit a2d6eef

Browse files
TheAlexLichteratinux
authored andcommitted
docs(build): add changes concerning minify and html.minify (nuxt#799)
1 parent 09948e2 commit a2d6eef

File tree

2 files changed

+32
-27
lines changed

2 files changed

+32
-27
lines changed

en/api/configuration-build.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,36 @@ To understand a bit more about the use of manifest and vendor, take a look at th
171171

172172
See [webpack-hot-middleware](https://github.com/glenjamin/webpack-hot-middleware) for available options.
173173

174+
## html.minify
175+
176+
- Type: `Object`
177+
- Default:
178+
179+
```js
180+
{
181+
collapseBooleanAttributes: true,
182+
collapseWhitespace: false,
183+
decodeEntities: true,
184+
minifyCSS: true,
185+
minifyJS: true,
186+
processConditionalComments: true,
187+
removeAttributeQuotes: false,
188+
removeComments: false,
189+
removeEmptyAttributes: true,
190+
removeOptionalTags: false,
191+
removeRedundantAttributes: true,
192+
removeScriptTypeAttributes: false,
193+
removeStyleLinkTypeAttributes: false,
194+
removeTagWhitespace: false,
195+
sortClassName: false,
196+
trimCustomFragments: true,
197+
useShortDoctype: true
198+
}
199+
```
200+
201+
Configuration for the [html-minifier](https://github.com/kangax/html-minifier) plugin used to minify
202+
HTML files created during the build process (will be applied for *all modes*).
203+
174204
## loaders
175205

176206
> Customize options of Nuxt.js integrated webpack loaders.

en/api/configuration-generate.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,8 @@ Interval between two render cycles to avoid flooding a potential API with API ca
3434

3535
## minify
3636

37-
- Type: `Object`
38-
- Default:
39-
40-
```js
41-
minify: {
42-
collapseBooleanAttributes: true,
43-
collapseWhitespace: false,
44-
decodeEntities: true,
45-
minifyCSS: true,
46-
minifyJS: true,
47-
processConditionalComments: true,
48-
removeAttributeQuotes: false,
49-
removeComments: false,
50-
removeEmptyAttributes: true,
51-
removeOptionalTags: false,
52-
removeRedundantAttributes: true,
53-
removeScriptTypeAttributes: false,
54-
removeStyleLinkTypeAttributes: false,
55-
removeTagWhitespace: false,
56-
sortAttributes: true,
57-
sortClassName: false,
58-
trimCustomFragments: true,
59-
useShortDoctype: true
60-
}
61-
```
62-
63-
You can change the default configuration of [html-minifier](https://github.com/kangax/html-minifier) used by Nuxt.js to minify HTML files created during generation.
37+
- **Deprecated!**
38+
- Use [build.html.minify](/api/configuration-build#html-minify) instead
6439

6540
## routes
6641

0 commit comments

Comments
 (0)