Skip to content

Commit

Permalink
chore: revert add back types
Browse files Browse the repository at this point in the history
This reverts commit e09ed15.
  • Loading branch information
patak-dev committed Sep 14, 2023
1 parent e09ed15 commit 82b11dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
9 changes: 3 additions & 6 deletions packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,8 @@ export interface ExperimentalOptions {

export interface LegacyOptions {
/**
* Revert vite build --ssr to the v2.9 strategy. Use CJS SSR build and v2.9 externalization heuristics
* Since Vite 5, this option is ignored.
* @experimental
* @deprecated SSR build output is now always ESM
* @default false
* No longer needed for now, but kept for backwards compatibility.
*/
buildSsrCjsExternalHeuristics?: boolean
}

export interface ResolveWorkerOptions extends PluginHookUtils {
Expand Down Expand Up @@ -847,7 +842,9 @@ assetFileNames isn't equal for every build.rollupOptions.output. A single patter

// Warn about removal of experimental features
if (
// @ts-expect-error Option removed
config.legacy?.buildSsrCjsExternalHeuristics ||
// @ts-expect-error Option removed
config.ssr?.format === 'cjs'
) {
resolved.logger.warn(
Expand Down
1 change: 0 additions & 1 deletion packages/vite/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export type {
ResolvedSSROptions,
SsrDepOptimizationOptions,
SSROptions,
SSRFormat,
SSRTarget,
} from './ssr'
export type { Plugin, HookHandler } from './plugin'
Expand Down
12 changes: 0 additions & 12 deletions packages/vite/src/node/ssr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ import type { DepOptimizationConfig } from '../optimizer'

export type SSRTarget = 'node' | 'webworker'

/**
* @deprecated SSR build output is now always ESM
*/
export type SSRFormat = 'esm' | 'cjs'

export type SsrDepOptimizationOptions = DepOptimizationConfig

export interface SSROptions {
Expand All @@ -18,13 +13,6 @@ export interface SSROptions {
* @default 'node'
*/
target?: SSRTarget
/**
* Define the format for the ssr build. Since Vite v5 this option is ignored.
* @experimental
* @deprecated SSR build output is now always ESM
* @default 'esm'
*/
format?: SSRFormat
/**
* Control over which dependencies are optimized during SSR and esbuild options
* During build:
Expand Down

0 comments on commit 82b11dc

Please sign in to comment.