Skip to content

Commit

Permalink
Remove build.minify: true, add v3_lazyRouteDiscovery (#68)
Browse files Browse the repository at this point in the history
• build: { minify: true } causes variable names to be mangled in the SSR build of the app, which means that Models will have the wrong name and will wind up pointing at non-existent (or wrong) D1 tables
• v3_lazyRouteDiscovery is a new default behavior for remix that doesn’t require any other changes to enable
  • Loading branch information
acusti authored Dec 17, 2024
1 parent c46c8d9 commit f12cb09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions apps/site/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default defineConfig({
remix({
future: {
v3_fetcherPersist: true,
v3_lazyRouteDiscovery: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
Expand All @@ -26,7 +27,4 @@ export default defineConfig({
resolve: {
mainFields: ["browser", "module", "main"],
},
build: {
minify: true,
},
});
4 changes: 1 addition & 3 deletions examples/remix-cms/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default defineConfig({
remix({
future: {
v3_fetcherPersist: true,
v3_lazyRouteDiscovery: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
Expand All @@ -34,7 +35,4 @@ export default defineConfig({
resolve: {
mainFields: ["browser", "module", "main"],
},
build: {
minify: true,
},
});
4 changes: 1 addition & 3 deletions templates/remix/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default defineConfig({
remix({
future: {
v3_fetcherPersist: true,
v3_lazyRouteDiscovery: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
Expand All @@ -23,7 +24,4 @@ export default defineConfig({
resolve: {
mainFields: ["browser", "module", "main"],
},
build: {
minify: true,
},
});

0 comments on commit f12cb09

Please sign in to comment.