Migration guide
Migrating from 1x to 2x should be straight forward. If you experience any issues, please give us a shout on Discord or Github. (Links in navigation)
@sveltech/routifyis now@roxi/routifyroutifyDirhas been defaulted to.routify.- Option A) Update to
import { routes } from '../.routify/routes'inApp.svelte - Option B) Set
routifyDirtonode_modules/@roxi/routify/tmp/routes.
- Option A) Update to
Feature migration
Your project may be affected by the changes below if you’re using the corresponding features.
$url()no longer treats pages as folders. If you’re using relative paths in a page replace the first../in$url()with./.$basepathwas deprecated in favor of urlTransform.$layoutnow strictly refers to the nearest layout and not the current component. In non-layout files$layout.parentshould be$layout- Metadata is now evaluated as JSON and not JS.
- The Routify rollup plugin, now has to be imported directly (
import routify from '@roxi/routify/plugins/rollup') - Routify 2 uses code splitting by default. To disable, set
dynamicImports: false.
Writing good documentation that is up-to-date is difficult. If you notice a mistake, help us out.