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 runtime versions have been raised. See minimum requirements.
- Long-deprecated symbols have been removed. See removed symbols.
Minimum requirements
| Dependency | Version |
|---|---|
react | >= 18.0.0 |
next | >= 14.0.0 (Next.js loader only) |
node | >= 18.17 (Next.js loader only) |
New package versions
| Package | New version | Additional breaking changes? |
|---|---|---|
@plasmicapp/loader-nextjs | 2 | Yes - see guide |
@plasmicapp/loader-gatsby | 2 | No |
@plasmicapp/loader-react | 2 | No |
| Codegen | Various | Yes - 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:
import * as NextNavigation from 'next/navigation'; // remove this lineinitPlasmicLoader({// ...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).
| Package | New version |
|---|---|
@plasmicapp/data-sources | 1 |
@plasmicapp/host | 2 |
@plasmicapp/react-web | 1 |
@plasmicapp/react-web-runtime | 1 |
Removed symbols
The following symbols have been removed. They are typically imported from a @plasmicapp/loader-* or @plasmicapp/host package.
| Symbol | Replacement |
|---|---|
ComponentMeta | CodeComponentMeta |
PageParamsProviderProps.path | PageParamsProviderProps.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!