mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Merge commit '346b60358dd8ec2ca228e6635bff9d7914b398b7'
This commit is contained in:
@@ -6,8 +6,8 @@ keywords: [build,buildStats,cache]
|
||||
menu:
|
||||
docs:
|
||||
parent: getting-started
|
||||
weight: 60
|
||||
weight: 60
|
||||
weight: 70
|
||||
weight: 70
|
||||
slug: configuration-build
|
||||
toc: true
|
||||
---
|
||||
@@ -26,17 +26,14 @@ See [Configure Cache Busters](#configure-cache-busters).
|
||||
|
||||
#### noJSConfigInAssets
|
||||
|
||||
(`bool`) If `true`, turns off writing a `jsconfig.json` into your `/assets` folder with mapping of imports from running [js.Build](/hugo-pipes/js). This file is intended to help with intellisense/navigation inside code editors such as [VS Code](https://code.visualstudio.com/). Note that if you do not use `js.Build`, no file will be written.
|
||||
(`bool`) If `true`, turns off writing a `jsconfig.json` into your `assets` directory with mapping of imports from running [js.Build](/hugo-pipes/js). This file is intended to help with intellisense/navigation inside code editors such as [VS Code](https://code.visualstudio.com/). Note that if you do not use `js.Build`, no file will be written.
|
||||
|
||||
#### useResourceCacheWhen
|
||||
|
||||
(`string`) When to use the cached resources in `/resources/_gen` for PostCSS and ToCSS. Valid values are `never`, `always` and `fallback`. The last value means that the cache will be tried if PostCSS/extended version is not available.
|
||||
|
||||
|
||||
## Configure cache busters
|
||||
|
||||
{{< new-in 0.112.0 >}}
|
||||
|
||||
The `build.cachebusters` configuration option was added to support development using Tailwind 3.x's JIT compiler where a `build` configuration may look like this:
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
@@ -78,11 +75,11 @@ If `enable` is set to `true`, creates a `hugo_stats.json` file in the root of yo
|
||||
Exclude `class` attributes, `id` attributes, or tags from `hugo_stats.json` with the `disableClasses`, `disableIDs`, and `disableTags` keys.
|
||||
|
||||
{{% note %}}
|
||||
Given that CSS purging is typically limited to production builds, place the `buildStats` object below [config/production].
|
||||
Given that CSS purging is typically limited to production builds, place the `buildStats` object below [`config/production`].
|
||||
|
||||
[config/production]: /getting-started/configuration/#configuration-directory
|
||||
[`config/production`]: /getting-started/configuration/#configuration-directory
|
||||
|
||||
Built for speed, there may be "false positive" detections (e.g., HTML elements that are not HTML elements) while parsing the published site. These "false positives" are infrequent and inconsequential.
|
||||
{{% /note %}}
|
||||
|
||||
Due to the nature of partial server builds, new HTML entities are added while the server is running, but old values will not be removed until you restart the server or run a regular `hugo` build.
|
||||
Due to the nature of partial server builds, new HTML entities are added while the server is running, but old values will not be removed until you restart the server or run a regular `hugo` build.
|
||||
|
Reference in New Issue
Block a user