@@ -7,7 +7,6 @@ import type { RollupOptions, RollupOutput } from '@rolldown/node'
7
7
import * as rolldown from '@rolldown/node'
8
8
import colors from 'picocolors'
9
9
import type { BuildOptions as EsbuildBuildOptions , Loader } from 'esbuild'
10
- import { build } from 'esbuild'
11
10
import { init , parse } from 'es-module-lexer'
12
11
import glob from 'fast-glob'
13
12
import { createFilter } from '@rollup/pluginutils'
@@ -1082,29 +1081,6 @@ function stringifyDepsOptimizerMetadata(
1082
1081
)
1083
1082
}
1084
1083
1085
- function esbuildOutputFromId (
1086
- outputs : Record < string , any > ,
1087
- id : string ,
1088
- cacheDirOutputPath : string ,
1089
- ) : any {
1090
- const cwd = process . cwd ( )
1091
- const flatId = flattenId ( id ) + '.js'
1092
- const normalizedOutputPath = normalizePath (
1093
- path . relative ( cwd , path . join ( cacheDirOutputPath , flatId ) ) ,
1094
- )
1095
- const output = outputs [ normalizedOutputPath ]
1096
- if ( output ) {
1097
- return output
1098
- }
1099
- // If the root dir was symlinked, esbuild could return output keys as `../cwd/`
1100
- // Normalize keys to support this case too
1101
- for ( const [ key , value ] of Object . entries ( outputs ) ) {
1102
- if ( normalizePath ( path . relative ( cwd , key ) ) === normalizedOutputPath ) {
1103
- return value
1104
- }
1105
- }
1106
- }
1107
-
1108
1084
export async function extractExportsData (
1109
1085
filePath : string ,
1110
1086
config : ResolvedConfig ,
@@ -1240,6 +1216,8 @@ export function getDepHash(config: ResolvedConfig, ssr: boolean): string {
1240
1216
exclude : optimizeDeps ?. exclude ,
1241
1217
rollupOptions : {
1242
1218
...optimizeDeps ?. rollupOptions ,
1219
+ // TODO(underfin): the rollupOptions.plugins how to exclude `ParallelPlugin`
1220
+ // @ts -ignore
1243
1221
plugins : optimizeDeps ?. rollupOptions ?. plugins ?. map ( ( p ) => p . name ) ,
1244
1222
} ,
1245
1223
} ,
0 commit comments