Migrating from RedwoodJS to CedarJS
The latest version of Cedar that's fully compatible with RedwoodJS is CedarJS v1.x. Newer versions of Cedar, like v2, have breaking changes compared to RW. Please migrate to Cedar v1 first, and make sure that's working, before migrating to v2 or newer.
Required Steps
- Search and replace all instances of
"@redwoodjs/(.*)": "\d+\.\d+\.\d+"with"@cedarjs/$1": "1.1.1"in all threepackage.jsonfiles. - Run
yarn installto update your lock file. - Make a git commit with all changes as a checkpoint to make it easier to see what changes in the following steps
- Search and replace all instances of
@redwoodjsin all files with@cedarjs. - Also find all mentions of
storybook-framework-redwoodjs-viteand replace withstorybook-framework-cedarjs - Pay attention to
yarn.lock. If anything changed in there you probably have to do some manual editing. (Reach out on Discord if you need help.) - Delete all files and folders inside
.redwood/exceptREADME.md - Run
yarn installandyarn cedar build. Make sure everything works as expected. - Make a new git commit (or amend the previous one you did)
Optional, but Hightly Recommended, Steps
- Update
web/vite.config.tsto haveimport { cedar } from '@cedarjs/vite'andplugins: [cedar()],instead of the olderimport redwood from '@redwoodjs/vite'andplugins: [redwood()],. (Notice that it's now a named import instead of a default import.)