Skip to content

Commit

Permalink
Enable all stable future flags in templates (#10125)
Browse files Browse the repository at this point in the history
  • Loading branch information
brookslybrand authored Oct 16, 2024
1 parent aabc7f8 commit a4b3829
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/cloudflare-workers/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import type { LinksFunction } from "@remix-run/cloudflare";

import "./tailwind.css";

Expand Down
2 changes: 1 addition & 1 deletion templates/cloudflare-workers/app/routes/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { MetaFunction } from "@remix-run/node";
import type { MetaFunction } from "@remix-run/cloudflare";

export const meta: MetaFunction = () => {
return [
Expand Down
8 changes: 8 additions & 0 deletions templates/cloudflare-workers/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import {
} from "@remix-run/dev";
import tsconfigPaths from "vite-tsconfig-paths";

declare module "@remix-run/cloudflare" {
interface Future {
v3_singleFetch: true;
}
}

export default defineConfig({
plugins: [
cloudflareDevProxyVitePlugin(),
Expand All @@ -13,6 +19,8 @@ export default defineConfig({
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
Expand Down
8 changes: 8 additions & 0 deletions templates/cloudflare/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import {
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

declare module "@remix-run/cloudflare" {
interface Future {
v3_singleFetch: true;
}
}

export default defineConfig({
plugins: [
remixCloudflareDevProxy(),
Expand All @@ -13,6 +19,8 @@ export default defineConfig({
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
Expand Down
8 changes: 8 additions & 0 deletions templates/express/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

declare module "@remix-run/node" {
interface Future {
v3_singleFetch: true;
}
}

export default defineConfig({
plugins: [
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
Expand Down
2 changes: 2 additions & 0 deletions templates/remix-javascript/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export default defineConfig({
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
],
Expand Down
8 changes: 8 additions & 0 deletions templates/remix/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

declare module "@remix-run/node" {
interface Future {
v3_singleFetch: true;
}
}

export default defineConfig({
plugins: [
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
Expand Down
8 changes: 8 additions & 0 deletions templates/spa/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

declare module "@remix-run/node" {
interface Future {
v3_singleFetch: true;
}
}

export default defineConfig({
plugins: [
remix({
Expand All @@ -10,6 +16,8 @@ export default defineConfig({
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
tsconfigPaths(),
Expand Down

0 comments on commit a4b3829

Please sign in to comment.