mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit '28bd06265e88454b061810578919d891909a83ad'
This commit is contained in:
@@ -11,9 +11,14 @@ images:
|
||||
|
||||
|
||||
|
||||
This is a bug-fix release with one important fix.
|
||||
|
||||
* Add .Defines to js.Build options [35011bcb](https://github.com/gohugoio/hugo/commit/35011bcb26b6fcfcbd77dc05aa8246ca45b2c2ba) [@bep](https://github.com/bep) [#7489](https://github.com/gohugoio/hugo/issues/7489)
|
||||
Add .Defines to js.Build options [35011bcb](https://github.com/gohugoio/hugo/commit/35011bcb26b6fcfcbd77dc05aa8246ca45b2c2ba) [@bep](https://github.com/bep) [#7489](https://github.com/gohugoio/hugo/issues/7489)
|
||||
|
||||
This is needed to import `react` as a library, e.g.:
|
||||
|
||||
```
|
||||
{{ $jsx := resources.Get "index.jsx" }}
|
||||
{{ $options := dict "defines" (dict "process.env.NODE_ENV" "\"development\"") }}
|
||||
{{ $js := $jsx | js.Build $options }}
|
||||
```
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user