diff --git a/content/en/news/0.74.2-relnotes/index.md b/content/en/news/0.74.2-relnotes/index.md index 0f77133eb..e78d8564c 100644 --- a/content/en/news/0.74.2-relnotes/index.md +++ b/content/en/news/0.74.2-relnotes/index.md @@ -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 }} +```