Skip to content

sku@13.2.0

Compare
Choose a tag to compare
@seek-oss-ci seek-oss-ci released this 03 Oct 01:34
· 51 commits to master since this release
39da8a5

Minor Changes

  • Add experimental renderToStringAsync parameter in renderApp (#1050)

    The new renderToStringAsync method can be called instead of React DOM's renderToString. It is an asynchronous function, but once awaited should return the same result.

    This new function won't error when hitting suspended components during a static render, instead it'll wait for all suspended boundaries to resolve.

    Note: react-dom is now an optional peer dependency for use in this function. All known uses of static rendering use react-dom and shouldn't need to make a change.

    The function is being provided to enable teams to trial the behaviour, but is not encouraged for production use.

    -import { renderToString } from 'react-dom/server';
    
    const skuRender: Render<RenderContext> = {
    -  renderApp: ({ SkuProvider, environment }) => {
    +  renderApp: async ({ SkuProvider, environment, renderToStringAsync }) => {
    -    const appHtml = renderToString(
    +    const appHtml = await renderToStringAsync(
          <SkuProvider>
            <App environment={environment as ClientContext['environment']} />
          </SkuProvider>,
        );
    
        return {
          appHtml,
        };
      },
      // ...
    };

    This new feature is experimental, and is likely to change in implementation or may be removed completely.

Patch Changes

  • Disable babel-loader cache compression (#1060)

    sku applications tend to transpile many modules and upload all cache files as a single compressed file. This makes compressing each individual cache file superfluous, so this feature has been disabled.

  • Adds "Chrome" and "Edge" as fallback browser names for reusing existing tabs, improving compatibility with different Chromium browser versions which may use abbreviated browser names. (#1061)