Skip to content

Commit

Permalink
Turn on v3_lazyRouteDiscovery flag (#2702)
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardlyhel authored Jan 10, 2025
1 parent 38e98bb commit ed625de
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .changeset/stupid-socks-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
'skeleton': patch
'@shopify/cli-hydrogen': patch
---

Turn on future flag `v3_lazyRouteDiscovery`

In your vite.config.ts, add the following line:

```diff
export default defineConfig({
plugins: [
hydrogen(),
oxygen(),
remix({
presets: [hydrogen.preset()],
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
+ v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
],
```

Test your app by running `npm run dev` and nothing should break
1 change: 1 addition & 0 deletions examples/classic-remix/remix.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ module.exports = {
v3_fetcherPersist: true,
v3_relativeSplatpath: true,
v3_throwAbortReason: true,
v3_lazyRouteDiscovery: true,
},
};
1 change: 1 addition & 0 deletions examples/express/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineConfig({
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
Expand Down
1 change: 1 addition & 0 deletions examples/multipass/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default defineConfig({
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
Expand Down
1 change: 1 addition & 0 deletions packages/cli/assets/vite/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default defineConfig({
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
Expand Down
1 change: 1 addition & 0 deletions templates/skeleton/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default defineConfig({
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
Expand Down

0 comments on commit ed625de

Please sign in to comment.