Skip to content

v0.9.0

Compare
Choose a tag to compare
@robisim74 robisim74 released this 22 Mar 21:53
· 195 commits to main since this release
  • Update Qwik to v0.23.0 51cd80a
  • Merge pull request #35 from robisim74/split-chunks 774ae87

BREAKING CHANGES
To improve performance, the changeLocale function has been removed and it is no longer possible to change locale at runtime without navigating/reloading the page.

To be compliant with i18n Qwik documentation, Qwik Speak Inline plugin generates chunks for each language, and the loading of translation files takes place only in dev mode or on server (except for the new runtimeAssets).

So you must:

  • Remove changeLocale function and navigate/reload the page to change locale
  • Move your runtime assets into the new option runtimeAssets
  • Remove isDev and other checks from loadTranslation$
  • Provide the base URL for the chunks in entry.ssr.tsx:
export function extractBase({ serverData }: RenderOptions): string {
  if (!isDev && serverData?.locale) {
    return '/build/' + serverData.locale;
  } else {
    return '/build';
  }
}

export default function (opts: RenderToStreamOptions) {
  return renderToStream(<Root />, {
    manifest,
    ...opts,
    // Determine the base URL for the client code
    base: extractBase,
  });
}

Ses Qwik Speak Inline Vite plugin and tutorial for more details.

v0.8.0...v0.9.0