Skip to content

Commit

Permalink
js: Add Inject config option
Browse files Browse the repository at this point in the history
Fixes #8164
  • Loading branch information
bep committed Jan 22, 2021
1 parent 4532198 commit 5acc8b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/en/hugo-pipes/js.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ minify [bool]
avoidTDZ {{< new-in "0.78.0" >}}
: There is/was a bug in WebKit with severe performance issue with the tracking of TDZ checks in JavaScriptCore. Enabling this flag removes the TDZ and `const` assignment checks and may improve performance of larger JS codebases until the WebKit fix is in widespread use. See https://bugs.webkit.org/show_bug.cgi?id=199866

inject [slice] {{< new-in "0.81.0" >}}
: This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`. See https://esbuild.github.io/api/#inject

shims {{< new-in "0.81.0" >}}
: This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development:

Expand Down

0 comments on commit 5acc8b6

Please sign in to comment.