Skip to main content
If you haven’t yet upgraded to 0.25.0, please review the 0.25.0 upgrade guide first. v0.26.0 of the runtime optimizes the client bundle for Makeswift-integrated hosts, and reorganizes several package exports. As part of this reorganization, several internal functions and types have been moved to internal-only entry points. Refer to the official release notes for the full list of changes.

Breaking Changes

previewMode option in Next.js plugin replaced

The Next.js plugin’s previewMode option has been replaced with disableBuiltInPreview. This option is false by default. When set to true, this option disables the built-in preview mode handling provided by the plugin. In that case, you will need to implement your own preview mode handling in order to edit your site in the builder. For most use cases, we recommend using the built-in preview mode handling.

Relocated MakeswiftComponentType and builtin components

The MakeswiftComponentType export — commonly used to override Makeswift’s built-in component registrations — has been moved to the @makeswift/runtime/react/builtins entry point:
- import { MakeswiftComponentType } from '@makeswift/runtime';
+ import { MakeswiftComponentType } from '@makeswift/runtime/react/builtins';
Similarly, each builtin component has been moved to its own entry point within the @makeswift/runtime/react/builtins module. This structure enables better tree-shaking and smaller client bundles. For example, the Image component can now be imported from @makeswift/runtime/react/builtins/image:
- import { Image } from '@makeswift/runtime/components';
+ import { Image } from '@makeswift/runtime/react/builtins/image';

New APIs

builtinSuspense option in registerComponent

We’ve added a new builtinSuspense option to registerComponent that lets you control whether the Makeswift runtime wraps a component in its default <Suspense> boundary. The builtinSuspense option defaults to true. If your component already includes its own <Suspense> boundary, set this option to false to prevent the Makeswift runtime from adding another one on top:
import { TextInput } from "@makeswift/runtime/controls";
import { runtime } from "./runtime";

function Discography({ artistId }: { artistId?: string }) {
  return (
    <>
      <h2>Discography</h2>
      {/* component's own Suspense boundary with a fallback */}
      <Suspense fallback={<div>Loading...</div>}>
        <AlbumList artistId={artistId} />
      </Suspense>
    </>
  );
}

runtime.registerComponent(Discography, {
  type: 'section-discography',
  label: 'Discography',
  builtinSuspense: false, // disable the built-in Suspense boundary
  props: {
    artistId: TextInput({ label: 'Artist ID' }),
  },
});
I