mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
Merge commit '90ad8045056167004d27857a95542936657b8a16'
This commit is contained in:
@@ -65,6 +65,10 @@ compact [bool]
|
||||
verbose [bool]
|
||||
: Log everything
|
||||
|
||||
sourceMap [string]
|
||||
: Output `inline` or `external` sourcemap from the babel compile. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
```go-html-template
|
||||
|
@@ -70,6 +70,10 @@ With the above, these imports should work in both scenarios:
|
||||
import * as React from 'react'
|
||||
import * as ReactDOM from 'react-dom';
|
||||
```
|
||||
sourceMap [string, bool] {{< new-in "0.75.0" >}}
|
||||
: Let `js.Build` output sourceMap. Current only inline is supported. true defaults to inline.
|
||||
One of: '`inline`, `external`
|
||||
Default is "" (disabled)
|
||||
|
||||
target [string]
|
||||
: The language target.
|
||||
@@ -93,7 +97,7 @@ format [string] {{< new-in "0.74.3" >}}
|
||||
Default is `iife`, a self-executing function, suitable for inclusion as a <script> tag.
|
||||
|
||||
sourceMap
|
||||
: Whether to generate source maps. Enum, currently only `inline` (we will improve that).
|
||||
: Whether to generate `inline` or `external` sourcemap from esbuild. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
|
||||
|
||||
### Import JS code from /assets
|
||||
|
||||
|
@@ -33,7 +33,7 @@ If you are using the Hugo Snap package, PostCSS and plugin(s) need to be install
|
||||
### Options
|
||||
|
||||
config [string]
|
||||
: Path to the PostCSS configuration file
|
||||
: Set a custom directory to look for a config file
|
||||
|
||||
noMap [bool]
|
||||
: Default is `false`. Disable the default inline sourcemaps
|
||||
@@ -63,7 +63,7 @@ syntax [string]
|
||||
: Custom postcss syntax
|
||||
|
||||
```go-html-template
|
||||
{{ $options := dict "config" "customPostCSS.js" "noMap" true }}
|
||||
{{ $options := dict "config" "/path/to/custom-config-directory" "noMap" true }}
|
||||
{{ $style := resources.Get "css/main.css" | resources.PostCSS $options }}
|
||||
|
||||
{{ $options := dict "use" "autoprefixer postcss-color-alpha" }}
|
||||
|
Reference in New Issue
Block a user