Upgrade to Loader V2

Published

Overview

This guide will help you upgrade your loader package to V2. Codegen and dependent projects also received a major version bump.

The main goal of these releases is to bump the minimum React version to 18 and prepare for full support of React 19 and React Server Components (RSC). We also removed long-deprecated APIs and dropped support for older runtimes.

Breaking changes

All packages share the following breaking changes:

Minimum requirements

DependencyVersion
react>= 18.0.0
next>= 14.0.0 (Next.js loader only)
node>= 18.17 (Next.js loader only)

New package versions

PackageNew versionAdditional breaking changes?
@plasmicapp/loader-nextjs2Yes - see guide
@plasmicapp/loader-gatsby2No
@plasmicapp/loader-react2No
CodegenVariousYes - see guide

Loader (Next.js)

@plasmicapp/loader-nextjs now requires Next.js 14+ and Node 18.17+.

In case you are already on App Router and passing in the next/navigation import to initPlasmicLoader, you’ll need to remove that now:

Copy
import * as NextNavigation from 'next/navigation'; // remove this line
initPlasmicLoader({
// ...
nextNavigation: NextNavigation // remove this line
});

Codegen

For codegen users using the CLI (plasmic sync), upgrade the relevant packages in your package.json. You only need to update packages you’re already using—no need to add new ones. Most users only have @plasmicapp/react-web (and sometimes @plasmicapp/host for code components).

PackageNew version
@plasmicapp/data-sources1
@plasmicapp/host2
@plasmicapp/react-web1
@plasmicapp/react-web-runtime1

Removed symbols

The following symbols have been removed. They are typically imported from a @plasmicapp/loader-* or @plasmicapp/host package.

SymbolReplacement
ComponentMetaCodeComponentMeta
PageParamsProviderProps.pathPageParamsProviderProps.route

Looking forward

These changes lay the groundwork for a new feature we’re really excited about. React 19 and server components open up a new way to get data into your app, and we plan to take advantage of that. Soon you’ll be able to run data queries directly on your server, with no round-trip through Plasmic’s infrastructure and no client-side data-fetching component required. Stay tuned!

Is this page helpful?

NoYes