Despite being a simple change, the V1 design introduces new foundational capabilities. If you're curious: Why the V1 design?
The overall architecture stays the same: the V1 design is mostly about replacing .page.js files with so-called plus files: +Page.js, +route.js, +onBeforeRender.js, ...
The migration is straightforward and usually quick to implement. We encourage you to migrate sooner rather than later.
Don't hesitate to reach out if you run into any issue.
The old design is still supported but we recommend to migrate as the docs now showcase the V1 design.
Main migration
Make sure to update Vike to its latest version.
You need to either fully use the V1 design, or fully use the old design. You cannot mix both.
Most of the migration boils down to the following two steps.
1. Migrate /renderer/*.page.*
Move your renderer/ hooks to + files:
If you've defined a global onBeforeRender() hook and/or passToClient:
See API > Config for more information about what + and .h.js means.
The suffixes such as .page.server.js and .page.client.js don't exist anymore. After the feature request #744 is implemented, you'll be able to use .server.js and .client.js suffixes again but note that they'll serve another purpose.
Move /renderer/ configurations to /renderer/+config.ts:
Move your error page (if you defined one):
2. Migrate /pages/**/*.page.*
Each page now lives in its own directory.
Apply following additional steps if you've defined: