Skip to content

Commit

Permalink
refactor: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Sep 15, 2023
1 parent 82b11dc commit 4899118
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 31 deletions.
9 changes: 0 additions & 9 deletions packages/vite/src/node/optimizer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -822,15 +822,6 @@ async function prepareEsbuildOptimizerRun(
return { context, idToExports }
}

export async function findKnownImports(
config: ResolvedConfig,
ssr: boolean,
): Promise<string[]> {
const { deps } = await scanImports(config).result
await addManuallyIncludedOptimizeDeps(deps, config, ssr)
return Object.keys(deps)
}

export async function addManuallyIncludedOptimizeDeps(
deps: Record<string, string>,
config: ResolvedConfig,
Expand Down
6 changes: 0 additions & 6 deletions packages/vite/src/node/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,6 @@ export interface ViteDevServer {
* @internal
*/
_importGlobMap: Map<string, { affirmed: string[]; negated: string[] }[]>
/**
* Deps that are externalized
* @internal
*/
_ssrExternals: string[] | null
/**
* @internal
*/
Expand Down Expand Up @@ -504,7 +499,6 @@ export async function _createServer(
return server._restartPromise
},

_ssrExternals: null,
_restartPromise: null,
_importGlobMap: new Map(),
_forceOptimizeOnRestart: false,
Expand Down
6 changes: 0 additions & 6 deletions packages/vite/src/node/ssr/__tests__/ssrExternal.spec.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/vite/src/node/ssr/ssrExternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ import type { ResolvedConfig } from '..'

const debug = createDebugger('vite:ssr-external')

/**
* Converts "parent > child" syntax to just "child"
*/
export function stripNesting(packages: string[]): string[] {
return packages.map((s) => {
const arr = s.split('>')
return arr[arr.length - 1].trim()
})
}

const isSsrExternalCache = new WeakMap<
ResolvedConfig,
(id: string, importer?: string) => boolean | undefined
Expand Down

0 comments on commit 4899118

Please sign in to comment.