diff --git a/.changeset/serious-lizards-prove.md b/.changeset/serious-lizards-prove.md new file mode 100644 index 00000000000..2d3d54ad80b --- /dev/null +++ b/.changeset/serious-lizards-prove.md @@ -0,0 +1,7 @@ +--- +"@remix-run/dev": minor +--- + +Vite: Stabilize the Remix Vite plugin, Cloudflare preset, and all related types by removing all `unstable_` / `Unstable_` prefixes. + +While this is a breaking change for existing Remix Vite plugin consumers, now that the plugin has stabilized, there will no longer be any breaking changes outside of a major release. Thank you to all of our early adopters and community contributors for helping us get here! 🙏 diff --git a/docs/future/presets.md b/docs/future/presets.md index 95ffabe6c52..7a5a4a08636 100644 --- a/docs/future/presets.md +++ b/docs/future/presets.md @@ -1,8 +1,8 @@ --- -title: Presets (Unstable) +title: Presets --- -# Presets (Unstable) +# Presets The [Remix Vite plugin][remix-vite] supports a `presets` option to ease integration with other tools and hosting providers. @@ -19,8 +19,8 @@ Presets are designed to be published to npm and used within your Vite config. Fo ```ts filename=vite.config.ts lines=[3,11] import { - unstable_vitePlugin as remix, - unstable_cloudflarePreset as cloudflare, + vitePlugin as remix, + cloudflarePreset as cloudflare, } from "@remix-run/dev"; import { defineConfig } from "vite"; import { getBindingsProxy } from "wrangler"; @@ -41,10 +41,10 @@ export default defineConfig({ ## Creating a preset -Presets conform to the following `Unstable_Preset` type: +Presets conform to the following `Preset` type: ```ts -type Unstable_Preset = { +type Preset = { name: string; remixConfig?: () => @@ -62,7 +62,7 @@ type Unstable_Preset = { As a basic example, let's create a preset that configures a [server bundles function][server-bundles]: ```ts filename=my-cool-preset.ts -import type { Unstable_Preset as Preset } from "@remix-run/dev"; +import type { Preset } from "@remix-run/dev"; export function myCoolPreset(): Preset { return { @@ -90,8 +90,8 @@ In our example preset, the `serverBundles` function could be overridden with a d ```ts filename=my-cool-preset.ts lines=[22-26] import type { - Unstable_Preset as Preset, - Unstable_ServerBundlesFunction as ServerBundlesFunction, + Preset, + ServerBundlesFunction, } from "@remix-run/dev"; const serverBundles: ServerBundlesFunction = ({ diff --git a/docs/future/server-bundles.md b/docs/future/server-bundles.md index ab38a260213..e9a51588663 100644 --- a/docs/future/server-bundles.md +++ b/docs/future/server-bundles.md @@ -1,8 +1,8 @@ --- -title: Server Bundles (Unstable) +title: Server Bundles --- -# Server Bundles (Unstable) +# Server Bundles This is an advanced feature designed for hosting provider integrations. When compiling your app into multiple server bundles, there will need to be a custom routing layer in front of your app directing requests to the correct bundle. @@ -13,7 +13,7 @@ The provided `serverBundles` function is called for each route in the tree (exce For each route, this function is passed an array of routes leading to and including that route, referred to as the route `branch`. This allows you to create server bundles for different portions of the route tree. For example, you could use this to create a separate server bundle containing all routes within a particular layout route: ```ts filename=vite.config.ts lines=[7-15] -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ diff --git a/docs/future/spa-mode.md b/docs/future/spa-mode.md index d5184c03e82..9bdecf84e2b 100644 --- a/docs/future/spa-mode.md +++ b/docs/future/spa-mode.md @@ -41,7 +41,7 @@ Or, you can manually opt-into SPA mode in your Remix+Vite app by setting `ssr: f ```js // vite.config.ts -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ diff --git a/docs/future/vite.md b/docs/future/vite.md index 880710e80f7..d7d9d0b7ddf 100644 --- a/docs/future/vite.md +++ b/docs/future/vite.md @@ -1,8 +1,8 @@ --- -title: Vite (Unstable) +title: Vite --- -# Vite (Unstable) +# Vite [Vite][vite] is a powerful, performant and extensible development environment for JavaScript projects. In order to improve and extend Remix's bundling capabilities, we now support Vite as an alternative compiler. In the future, Vite will become the default compiler for Remix. @@ -12,13 +12,13 @@ We've got a few different Vite-based templates to get you started. ```shellscript nonumber # Minimal server: -npx create-remix@latest --template remix-run/remix/templates/unstable-vite +npx create-remix@latest --template remix-run/remix/templates/vite # Express: -npx create-remix@latest --template remix-run/remix/templates/unstable-vite-express +npx create-remix@latest --template remix-run/remix/templates/vite-express # Cloudflare: -npx create-remix@latest --template remix-run/remix/templates/unstable-vite-cloudflare +npx create-remix@latest --template remix-run/remix/templates/vite-cloudflare ``` These templates include a `vite.config.ts` file which is where the Remix Vite plugin is configured. @@ -30,7 +30,7 @@ The Vite plugin does not use [`remix.config.js`][remix-config]. Instead, the plu For example, to configure `ignoredRouteFiles`: ```ts filename=vite.config.ts lines=[7] -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ @@ -90,10 +90,10 @@ You may also want to enable the `manifest` option since, when server bundles are ## Cloudflare -To get started with Cloudflare, you can use the [`unstable-vite-cloudflare`][template-vite-cloudflare] template: +To get started with Cloudflare, you can use the [`vite-cloudflare`][template-vite-cloudflare] template: ```shellscript nonumber -npx create-remix@latest --template remix-run/remix/templates/unstable-vite-cloudflare +npx create-remix@latest --template remix-run/remix/templates/vite-cloudflare ``` There are two ways to run your Cloudflare app locally: @@ -118,8 +118,8 @@ Remix's Cloudflare preset accepts Wrangler's `getBindingsProxy` function to simu ```ts filename=vite.config.ts lines=[6,11] import { - unstable_vitePlugin as remix, - unstable_cloudflarePreset as cloudflare, + vitePlugin as remix, + cloudflarePreset as cloudflare, } from "@remix-run/dev"; import { defineConfig } from "vite"; import { getBindingsProxy } from "wrangler"; @@ -199,8 +199,8 @@ The Cloudflare preset accepts a `getRemixDevLoadContext` function whose return v ```ts filename=vite.config.ts lines=[9,16] import { - unstable_vitePlugin as remix, - unstable_cloudflarePreset as cloudflare, + vitePlugin as remix, + cloudflarePreset as cloudflare, } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; @@ -347,7 +347,7 @@ Remix is now just a Vite plugin, so you'll need to hook it up to Vite. 👉 **Replace `remix.config.js` with `vite.config.ts` at the root of your Remix app** ```ts filename=vite.config.ts -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ @@ -464,7 +464,7 @@ You'll also need to update to the new build output paths, which are `build/serve 👉 **Install global Node polyfills in your Vite config** ```diff filename=vite.config.ts -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; +import { installGlobals } from "@remix-run/node"; import { defineConfig } from "vite"; @@ -584,8 +584,8 @@ The Remix Vite plugin only officially supports [Cloudflare Pages][cloudflare-pag ```ts filename=vite.config.ts lines=[3,6,11,14-18] import { - unstable_vitePlugin as remix, - unstable_cloudflarePreset as cloudflare, + vitePlugin as remix, + cloudflarePreset as cloudflare, } from "@remix-run/dev"; import { defineConfig } from "vite"; import { getBindingsProxy } from "wrangler"; @@ -670,7 +670,7 @@ npm install -D vite-tsconfig-paths 👉 **Add `vite-tsconfig-paths` to your Vite config** ```ts filename=vite.config.ts lines=[3,6] -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; @@ -785,7 +785,7 @@ npm install -D @vanilla-extract/vite-plugin 👉 **Add the Vanilla Extract plugin to your Vite config** ```ts filename=vite.config.ts lines=[2,6] -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin"; import { defineConfig } from "vite"; @@ -815,7 +815,7 @@ In this case, that means putting the MDX plugin _before_ the Remix plugin. ```ts filename=vite.config.ts lines=[1,6] import mdx from "@mdx-js/rollup"; -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ @@ -837,7 +837,7 @@ npm install -D remark-frontmatter remark-mdx-frontmatter ```ts filename=vite.config.ts lines=[3-4,9-14] import mdx from "@mdx-js/rollup"; -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import remarkFrontmatter from "remark-frontmatter"; import remarkMdxFrontmatter from "remark-mdx-frontmatter"; import { defineConfig } from "vite"; @@ -1003,7 +1003,7 @@ Remember that you can always check the [Vite performance docs][vite-perf] for mo To visualize and analyze your bundle, you can use the [rollup-plugin-visualizer][rollup-plugin-visualizer] plugin: ```ts filename=vite.config.ts -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { visualizer } from "rollup-plugin-visualizer"; export default defineConfig({ @@ -1075,7 +1075,7 @@ We currently recommend excluding the plugin when used with other Vite-based tool For Vitest: ```ts filename=vite.config.ts lines=[7,12-13] -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig, loadEnv } from "vite"; export default defineConfig({ @@ -1091,7 +1091,7 @@ export default defineConfig({ For Storybook: ```ts filename=vite.config.ts lines=[7] -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; const isStorybook = process.argv[1]?.includes("storybook"); @@ -1203,7 +1203,7 @@ Finally, we were inspired by how other frameworks implemented Vite support: We're definitely late to the Vite party, but we're excited to be here now! [vite]: https://vitejs.dev -[template-vite-cloudflare]: https://github.com/remix-run/remix/tree/main/templates/unstable-vite-cloudflare +[template-vite-cloudflare]: https://github.com/remix-run/remix/tree/main/templates/vite-cloudflare [remix-config]: ../file-conventions/remix-config [app-directory]: ../file-conventions/remix-config#appdirectory [future]: ../file-conventions/remix-config#future diff --git a/integration/helpers/vite-template/vite.config.ts b/integration/helpers/vite-template/vite.config.ts index 177dd59b27d..a1fcb5a7b79 100644 --- a/integration/helpers/vite-template/vite.config.ts +++ b/integration/helpers/vite-template/vite.config.ts @@ -1,4 +1,4 @@ -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; diff --git a/integration/helpers/vite.ts b/integration/helpers/vite.ts index ba9b58bcd37..2ec4670abbb 100644 --- a/integration/helpers/vite.ts +++ b/integration/helpers/vite.ts @@ -26,7 +26,7 @@ export const viteConfig = { }, basic: async (args: { port: number }) => { return dedent` - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default { ${await viteConfig.server(args)} diff --git a/integration/spa-mode-test.ts b/integration/spa-mode-test.ts index ee00d3937f0..c79c59b41cb 100644 --- a/integration/spa-mode-test.ts +++ b/integration/spa-mode-test.ts @@ -22,7 +22,7 @@ test.describe("SPA Mode", () => { let cwd = await createProject({ "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ plugins: [remix({ ssr: false })], @@ -53,7 +53,7 @@ test.describe("SPA Mode", () => { let cwd = await createProject({ "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ plugins: [remix({ ssr: false })], @@ -82,7 +82,7 @@ test.describe("SPA Mode", () => { let cwd = await createProject({ "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ plugins: [remix({ ssr: false })], @@ -154,7 +154,7 @@ test.describe("SPA Mode", () => { let cwd = await createProject({ "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ plugins: [remix({ ssr: false })], @@ -183,7 +183,7 @@ test.describe("SPA Mode", () => { files: { "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ plugins: [remix({ ssr: false })], @@ -229,7 +229,7 @@ test.describe("SPA Mode", () => { files: { "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ plugins: [remix({ ssr: false })], @@ -271,7 +271,7 @@ test.describe("SPA Mode", () => { files: { "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ plugins: [remix({ @@ -350,7 +350,7 @@ test.describe("SPA Mode", () => { files: { "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ plugins: [remix({ ssr: false })], @@ -483,7 +483,7 @@ test.describe("SPA Mode", () => { files: { "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ build: { manifest: true }, diff --git a/integration/vite-basename-test.ts b/integration/vite-basename-test.ts index d41eaea8abe..115a653cc50 100644 --- a/integration/vite-basename-test.ts +++ b/integration/vite-basename-test.ts @@ -65,7 +65,7 @@ async function viteConfigFile({ basename?: string; }) { return js` - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default { ${base !== "/" ? 'base: "' + base + '",' : ""} diff --git a/integration/vite-build-test.ts b/integration/vite-build-test.ts index da7134bd650..b90d4e85604 100644 --- a/integration/vite-build-test.ts +++ b/integration/vite-build-test.ts @@ -28,7 +28,7 @@ test.describe("Vite build", () => { `, "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; import mdx from "@mdx-js/rollup"; export default defineConfig({ diff --git a/integration/vite-cloudflare-test.ts b/integration/vite-cloudflare-test.ts index fe3c10d1a48..7695a93739a 100644 --- a/integration/vite-cloudflare-test.ts +++ b/integration/vite-cloudflare-test.ts @@ -46,8 +46,8 @@ const files: Files = async ({ port }) => ({ ), "vite.config.ts": dedent` import { - unstable_vitePlugin as remix, - unstable_cloudflarePreset as cloudflare, + vitePlugin as remix, + cloudflarePreset as cloudflare, } from "@remix-run/dev"; import { getBindingsProxy } from "wrangler"; import { getLoadContext } from "./get-load-context"; diff --git a/integration/vite-css-test.ts b/integration/vite-css-test.ts index aa6a7c1d9ef..534baf20858 100644 --- a/integration/vite-css-test.ts +++ b/integration/vite-css-test.ts @@ -151,7 +151,7 @@ const files = { }; const VITE_CONFIG = async (port: number) => dedent` - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin"; export default { diff --git a/integration/vite-dev-custom-entry-test.ts b/integration/vite-dev-custom-entry-test.ts index 6444fee5863..e7be9e72371 100644 --- a/integration/vite-dev-custom-entry-test.ts +++ b/integration/vite-dev-custom-entry-test.ts @@ -23,7 +23,7 @@ test.describe("Vite custom entry dev", () => { `, "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default defineConfig({ server: { diff --git a/integration/vite-dev-test.ts b/integration/vite-dev-test.ts index ce864a58760..ec2f5d14fb4 100644 --- a/integration/vite-dev-test.ts +++ b/integration/vite-dev-test.ts @@ -25,7 +25,7 @@ test.describe("Vite dev", () => { `, "vite.config.ts": js` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; import mdx from "@mdx-js/rollup"; export default defineConfig({ diff --git a/integration/vite-dot-server-test.ts b/integration/vite-dot-server-test.ts index 119b0991fa8..67ca42fc89b 100644 --- a/integration/vite-dot-server-test.ts +++ b/integration/vite-dot-server-test.ts @@ -217,7 +217,7 @@ test.describe("Vite / non-route / server-only module referenced by client", () = test.describe("Vite / server-only escape hatch", async () => { let files: Files = async ({ port }) => ({ "vite.config.ts": dedent` - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; import envOnly from "vite-env-only"; import tsconfigPaths from "vite-tsconfig-paths"; diff --git a/integration/vite-hmr-hdr-test.ts b/integration/vite-hmr-hdr-test.ts index 4307af84300..68003e673a9 100644 --- a/integration/vite-hmr-hdr-test.ts +++ b/integration/vite-hmr-hdr-test.ts @@ -61,7 +61,7 @@ test("Vite / HMR & HDR / mdx", async ({ page, viteDev }) => { let files: Files = async ({ port }) => ({ "vite.config.ts": ` import { defineConfig } from "vite"; - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; import mdx from "@mdx-js/rollup"; export default defineConfig({ diff --git a/integration/vite-manifests-test.ts b/integration/vite-manifests-test.ts index 95f3cf013eb..59ac109f2c1 100644 --- a/integration/vite-manifests-test.ts +++ b/integration/vite-manifests-test.ts @@ -51,7 +51,7 @@ test.describe(() => { test.beforeAll(async () => { cwd = await createProject({ "vite.config.ts": dedent` - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default { build: { manifest: true }, diff --git a/integration/vite-plugin-order-validation-test.ts b/integration/vite-plugin-order-validation-test.ts index ca9f759dba4..1754f5718d6 100644 --- a/integration/vite-plugin-order-validation-test.ts +++ b/integration/vite-plugin-order-validation-test.ts @@ -10,7 +10,7 @@ test.describe(() => { test.beforeAll(async () => { cwd = await createProject({ "vite.config.ts": dedent` - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; import mdx from "@mdx-js/rollup"; export default { diff --git a/integration/vite-presets-test.ts b/integration/vite-presets-test.ts index b77426b6ab3..b43ffe32081 100644 --- a/integration/vite-presets-test.ts +++ b/integration/vite-presets-test.ts @@ -9,7 +9,7 @@ import { viteBuild, test, createProject } from "./helpers/vite.js"; const files = { "vite.config.ts": dedent` - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; import fs from "node:fs/promises"; import serializeJs from "serialize-javascript"; diff --git a/integration/vite-server-bundles-test.ts b/integration/vite-server-bundles-test.ts index b3d0abaf3be..62002bc54fe 100644 --- a/integration/vite-server-bundles-test.ts +++ b/integration/vite-server-bundles-test.ts @@ -119,7 +119,7 @@ test.describe(() => { port = await getPort(); cwd = await createProject({ "vite.config.ts": dedent` - import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { vitePlugin as remix } from "@remix-run/dev"; export default { ${await viteConfig.server({ port })} diff --git a/packages/remix-dev/index.ts b/packages/remix-dev/index.ts index a0bd34ae0e6..18e02eea342 100644 --- a/packages/remix-dev/index.ts +++ b/packages/remix-dev/index.ts @@ -7,9 +7,9 @@ export * as cli from "./cli/index"; export type { Manifest as AssetsManifest } from "./manifest"; export { getDependenciesToBundle } from "./dependencies"; export type { - Unstable_BuildManifest, - Unstable_Preset, - Unstable_ServerBundlesFunction, - Unstable_VitePluginConfig, + BuildManifest, + Preset, + ServerBundlesFunction, + VitePluginConfig, } from "./vite"; -export { unstable_vitePlugin, unstable_cloudflarePreset } from "./vite"; +export { vitePlugin, cloudflarePreset } from "./vite"; diff --git a/packages/remix-dev/vite/index.ts b/packages/remix-dev/vite/index.ts index cba7ac4a23c..f966bc2c94a 100644 --- a/packages/remix-dev/vite/index.ts +++ b/packages/remix-dev/vite/index.ts @@ -1,18 +1,18 @@ // This file allows us to dynamically require the plugin so non-Vite consumers // don't need to have Vite installed as a peer dependency. Only types should -// be imported at the top level. +// be imported at the top level, or code that doesn't import Vite. import type { RemixVitePlugin } from "./plugin"; export type { - BuildManifest as Unstable_BuildManifest, - Preset as Unstable_Preset, - VitePluginConfig as Unstable_VitePluginConfig, - ServerBundlesFunction as Unstable_ServerBundlesFunction, + BuildManifest, + Preset, + VitePluginConfig, + ServerBundlesFunction, } from "./plugin"; -export const unstable_vitePlugin: RemixVitePlugin = (...args) => { +export const vitePlugin: RemixVitePlugin = (...args) => { // eslint-disable-next-line @typescript-eslint/consistent-type-imports let { remixVitePlugin } = require("./plugin") as typeof import("./plugin"); return remixVitePlugin(...args); }; -export { preset as unstable_cloudflarePreset } from "./presets/cloudflare"; +export { cloudflarePreset } from "./presets/cloudflare"; diff --git a/packages/remix-dev/vite/presets/cloudflare.ts b/packages/remix-dev/vite/presets/cloudflare.ts index ed2ecc8a69c..aab0e75c8d1 100644 --- a/packages/remix-dev/vite/presets/cloudflare.ts +++ b/packages/remix-dev/vite/presets/cloudflare.ts @@ -18,7 +18,7 @@ type GetBindingsProxy = () => Promise<{ bindings: Record }>; /** * @param options.getRemixDevLoadContext - Augment the load context. */ -export const preset = ( +export const cloudflarePreset = ( getBindingsProxy: GetBindingsProxy, options: { getRemixDevLoadContext?: GetRemixDevLoadContext; diff --git a/templates/spa/vite.config.ts b/templates/spa/vite.config.ts index 1d6e93058b8..01e514ff333 100644 --- a/templates/spa/vite.config.ts +++ b/templates/spa/vite.config.ts @@ -1,4 +1,4 @@ -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; diff --git a/templates/unstable-vite-cloudflare/.eslintrc.cjs b/templates/vite-cloudflare/.eslintrc.cjs similarity index 100% rename from templates/unstable-vite-cloudflare/.eslintrc.cjs rename to templates/vite-cloudflare/.eslintrc.cjs diff --git a/templates/unstable-vite-cloudflare/.gitignore b/templates/vite-cloudflare/.gitignore similarity index 100% rename from templates/unstable-vite-cloudflare/.gitignore rename to templates/vite-cloudflare/.gitignore diff --git a/templates/unstable-vite-cloudflare/README.md b/templates/vite-cloudflare/README.md similarity index 100% rename from templates/unstable-vite-cloudflare/README.md rename to templates/vite-cloudflare/README.md diff --git a/templates/unstable-vite-cloudflare/app/root.tsx b/templates/vite-cloudflare/app/root.tsx similarity index 100% rename from templates/unstable-vite-cloudflare/app/root.tsx rename to templates/vite-cloudflare/app/root.tsx diff --git a/templates/unstable-vite-cloudflare/app/routes/_index.tsx b/templates/vite-cloudflare/app/routes/_index.tsx similarity index 100% rename from templates/unstable-vite-cloudflare/app/routes/_index.tsx rename to templates/vite-cloudflare/app/routes/_index.tsx diff --git a/templates/unstable-vite-cloudflare/env.d.ts b/templates/vite-cloudflare/env.d.ts similarity index 100% rename from templates/unstable-vite-cloudflare/env.d.ts rename to templates/vite-cloudflare/env.d.ts diff --git a/templates/unstable-vite-cloudflare/functions/[[path]].ts b/templates/vite-cloudflare/functions/[[path]].ts similarity index 100% rename from templates/unstable-vite-cloudflare/functions/[[path]].ts rename to templates/vite-cloudflare/functions/[[path]].ts diff --git a/templates/unstable-vite-cloudflare/load-context.ts b/templates/vite-cloudflare/load-context.ts similarity index 100% rename from templates/unstable-vite-cloudflare/load-context.ts rename to templates/vite-cloudflare/load-context.ts diff --git a/templates/unstable-vite-cloudflare/package.json b/templates/vite-cloudflare/package.json similarity index 100% rename from templates/unstable-vite-cloudflare/package.json rename to templates/vite-cloudflare/package.json diff --git a/templates/unstable-vite-cloudflare/public/favicon.ico b/templates/vite-cloudflare/public/favicon.ico similarity index 100% rename from templates/unstable-vite-cloudflare/public/favicon.ico rename to templates/vite-cloudflare/public/favicon.ico diff --git a/templates/unstable-vite-cloudflare/tsconfig.json b/templates/vite-cloudflare/tsconfig.json similarity index 100% rename from templates/unstable-vite-cloudflare/tsconfig.json rename to templates/vite-cloudflare/tsconfig.json diff --git a/templates/unstable-vite-cloudflare/vite.config.ts b/templates/vite-cloudflare/vite.config.ts similarity index 83% rename from templates/unstable-vite-cloudflare/vite.config.ts rename to templates/vite-cloudflare/vite.config.ts index af3a03507d4..4842ad88f18 100644 --- a/templates/unstable-vite-cloudflare/vite.config.ts +++ b/templates/vite-cloudflare/vite.config.ts @@ -1,6 +1,6 @@ import { - unstable_vitePlugin as remix, - unstable_cloudflarePreset as cloudflare, + vitePlugin as remix, + cloudflarePreset as cloudflare, } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; diff --git a/templates/unstable-vite-cloudflare/wrangler.toml b/templates/vite-cloudflare/wrangler.toml similarity index 100% rename from templates/unstable-vite-cloudflare/wrangler.toml rename to templates/vite-cloudflare/wrangler.toml diff --git a/templates/unstable-vite-express/.eslintrc.cjs b/templates/vite-express/.eslintrc.cjs similarity index 100% rename from templates/unstable-vite-express/.eslintrc.cjs rename to templates/vite-express/.eslintrc.cjs diff --git a/templates/unstable-vite-express/.gitignore b/templates/vite-express/.gitignore similarity index 100% rename from templates/unstable-vite-express/.gitignore rename to templates/vite-express/.gitignore diff --git a/templates/unstable-vite-express/README.md b/templates/vite-express/README.md similarity index 100% rename from templates/unstable-vite-express/README.md rename to templates/vite-express/README.md diff --git a/templates/unstable-vite-express/app/root.tsx b/templates/vite-express/app/root.tsx similarity index 100% rename from templates/unstable-vite-express/app/root.tsx rename to templates/vite-express/app/root.tsx diff --git a/templates/unstable-vite-express/app/routes/_index.tsx b/templates/vite-express/app/routes/_index.tsx similarity index 100% rename from templates/unstable-vite-express/app/routes/_index.tsx rename to templates/vite-express/app/routes/_index.tsx diff --git a/templates/unstable-vite-express/env.d.ts b/templates/vite-express/env.d.ts similarity index 100% rename from templates/unstable-vite-express/env.d.ts rename to templates/vite-express/env.d.ts diff --git a/templates/unstable-vite-express/package.json b/templates/vite-express/package.json similarity index 100% rename from templates/unstable-vite-express/package.json rename to templates/vite-express/package.json diff --git a/templates/unstable-vite-express/public/favicon.ico b/templates/vite-express/public/favicon.ico similarity index 100% rename from templates/unstable-vite-express/public/favicon.ico rename to templates/vite-express/public/favicon.ico diff --git a/templates/unstable-vite-express/server.js b/templates/vite-express/server.js similarity index 100% rename from templates/unstable-vite-express/server.js rename to templates/vite-express/server.js diff --git a/templates/unstable-vite-express/tsconfig.json b/templates/vite-express/tsconfig.json similarity index 100% rename from templates/unstable-vite-express/tsconfig.json rename to templates/vite-express/tsconfig.json diff --git a/templates/unstable-vite-express/vite.config.ts b/templates/vite-express/vite.config.ts similarity index 71% rename from templates/unstable-vite-express/vite.config.ts rename to templates/vite-express/vite.config.ts index 177dd59b27d..a1fcb5a7b79 100644 --- a/templates/unstable-vite-express/vite.config.ts +++ b/templates/vite-express/vite.config.ts @@ -1,4 +1,4 @@ -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; diff --git a/templates/unstable-vite/.eslintrc.cjs b/templates/vite/.eslintrc.cjs similarity index 100% rename from templates/unstable-vite/.eslintrc.cjs rename to templates/vite/.eslintrc.cjs diff --git a/templates/unstable-vite/.gitignore b/templates/vite/.gitignore similarity index 100% rename from templates/unstable-vite/.gitignore rename to templates/vite/.gitignore diff --git a/templates/unstable-vite/README.md b/templates/vite/README.md similarity index 100% rename from templates/unstable-vite/README.md rename to templates/vite/README.md diff --git a/templates/unstable-vite/app/root.tsx b/templates/vite/app/root.tsx similarity index 100% rename from templates/unstable-vite/app/root.tsx rename to templates/vite/app/root.tsx diff --git a/templates/unstable-vite/app/routes/_index.tsx b/templates/vite/app/routes/_index.tsx similarity index 100% rename from templates/unstable-vite/app/routes/_index.tsx rename to templates/vite/app/routes/_index.tsx diff --git a/templates/unstable-vite/env.d.ts b/templates/vite/env.d.ts similarity index 100% rename from templates/unstable-vite/env.d.ts rename to templates/vite/env.d.ts diff --git a/templates/unstable-vite/package.json b/templates/vite/package.json similarity index 100% rename from templates/unstable-vite/package.json rename to templates/vite/package.json diff --git a/templates/unstable-vite/public/favicon.ico b/templates/vite/public/favicon.ico similarity index 100% rename from templates/unstable-vite/public/favicon.ico rename to templates/vite/public/favicon.ico diff --git a/templates/unstable-vite/tsconfig.json b/templates/vite/tsconfig.json similarity index 100% rename from templates/unstable-vite/tsconfig.json rename to templates/vite/tsconfig.json diff --git a/templates/unstable-vite/vite.config.ts b/templates/vite/vite.config.ts similarity index 71% rename from templates/unstable-vite/vite.config.ts rename to templates/vite/vite.config.ts index 177dd59b27d..a1fcb5a7b79 100644 --- a/templates/unstable-vite/vite.config.ts +++ b/templates/vite/vite.config.ts @@ -1,4 +1,4 @@ -import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths";