Skip to content

Commit

Permalink
rename type VitePluginPreset -> Preset
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed Jan 31, 2024
1 parent 0ee9e54 commit 1917bc3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/remix-dev/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export * as cli from "./cli/index";

export type { Manifest as AssetsManifest } from "./manifest";
export { getDependenciesToBundle } from "./dependencies";
export type { Unstable_BuildManifest, Unstable_VitePluginPreset } from "./vite";
export type { Unstable_BuildManifest, Unstable_Preset } from "./vite";
export { unstable_vitePlugin, unstable_cloudflarePreset } from "./vite";
2 changes: 1 addition & 1 deletion packages/remix-dev/vite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import type { RemixVitePlugin } from "./plugin";
export type {
BuildManifest as Unstable_BuildManifest,
VitePluginPreset as Unstable_VitePluginPreset,
Preset as Unstable_Preset,
} from "./plugin";

export const unstable_vitePlugin: RemixVitePlugin = (...args) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-dev/vite/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ type ExcludedRemixConfigPresetKey =

type RemixConfigPreset = Omit<VitePluginConfig, ExcludedRemixConfigPresetKey>;

export type VitePluginPreset = {
export type Preset = {
name: string;
remixConfig?: () => RemixConfigPreset | Promise<RemixConfigPreset>;
remixConfigResolved?: (args: {
Expand Down Expand Up @@ -155,7 +155,7 @@ export type VitePluginConfig = RemixEsbuildUserConfigJsdocOverrides &
* An array of Remix config presets to ease integration with other platforms
* and tools.
*/
presets?: Array<VitePluginPreset>;
presets?: Array<Preset>;
/**
* The file name of the server build output. This file
* should end in a `.js` extension and should be deployed to your server.
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-dev/vite/presets/cloudflare.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type VitePluginPreset, setRemixDevLoadContext } from "../plugin";
import { type Preset, setRemixDevLoadContext } from "../plugin";

type GetRemixDevLoadContext = (
loadContext: Record<string, unknown>
Expand All @@ -19,7 +19,7 @@ export const preset = (
options: {
getRemixDevLoadContext?: GetRemixDevLoadContext;
} = {}
): VitePluginPreset => ({
): Preset => ({
name: "cloudflare",
remixConfig: async () => {
let { getBindingsProxy } = await importWrangler();
Expand Down

0 comments on commit 1917bc3

Please sign in to comment.