Skip to content

render-middleware v0.3.0

Choose a tag to compare

@github-actions github-actions released this 08 Sep 23:07
· 1 commit to main since this release
02e2d36

Minor Changes

  • BREAKING CHANGE: render({ assets }) now uses assets.getScriptEntry() to resolve client entries from source files so their import maps are included in rendered documents and frame responses. Custom asset server implementations must provide getScriptEntry() instead of getHref() and getPreloads(). It must return a Promise resolving to the following ScriptEntry shape:

    interface ScriptEntry {
      href: string
      preloads: string[]
      importMap: {
        imports: Record<string, string>
        scopes?: Record<string, Record<string, string>>
      }
    }

    Apps using createAssetServer() receive this integration automatically. Custom rendering setups can follow the asset server migration steps (see #11706).

Patch Changes