Skip to content

@shopify/mini-oxygen@3.0.0

Compare
Choose a tag to compare
@shopify-github-actions-access shopify-github-actions-access released this 11 Apr 18:47
· 193 commits to main since this release
705ad50

Major Changes

  • The default runtime exported from @shopify/mini-oxygen is now based on workerd. (#1891) by @frandiox

    The previous Node.js sandbox runtime has been moved to the @shopify/mini-oxygen/node export.

    Example usage:

    import {createMiniOxygen} from '@shopify/mini-oxygen';
    
    const miniOxygen = createMiniOxygen({
      workers: [
        {
          name: 'main',
          modules: true,
          script: `export default {
            async fetch() {
              const response = await fetch("https://hydrogen.shopify.dev");
              return response;
            }
          }`,
        },
      ],
    });
    
    const response = await miniOxygen.dispatchFetch('http://placeholder');
    console.log(await response.text());
    
    await miniOxygen.dispose();

Minor Changes

  • Export new Vite plugin from @shopify/mini-oxygen/vite. It integrates Vite with MiniOxygen by running the application code within a worker. (#1935) by @frandiox