Skip to content

Commit

Permalink
feat: migrate scan plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Nov 17, 2023
1 parent 81eadf3 commit 840822d
Show file tree
Hide file tree
Showing 2 changed files with 265 additions and 327 deletions.
14 changes: 0 additions & 14 deletions packages/vite/src/node/optimizer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import path from 'node:path'
import { promisify } from 'node:util'
import { performance } from 'node:perf_hooks'
import type { RollupOptions, RollupOutput } from '@rolldown/node'
import rollupPluginReplace from '@rollup/plugin-replace'
import * as rolldown from '@rolldown/node'
import colors from 'picocolors'
import type { BuildOptions as EsbuildBuildOptions } from 'esbuild'
Expand Down Expand Up @@ -592,14 +591,6 @@ export function runOptimizeDeps(

const start = performance.now()

if (resolvedConfig.optimizeDeps.esbuildOptions) {
config.logger.error(
`You've set "optimizeDeps.esbuildOptions" in your config. ` +
`This is deprecated and vite already use rollup to optimize packages. ` +
`Please use "optimizeDeps.rollupOptions" instead.`,
)
}

const preparedRun = prepareRollupOptimizerRun(
resolvedConfig,
depsInfo,
Expand Down Expand Up @@ -677,11 +668,6 @@ export function runOptimizeDeps(
})

.catch((e) => {
if (e.errors && e.message.includes('The build was canceled')) {
// esbuild logs an error when cancelling, but this is expected so
// return an empty result instead
return cancelledResult
}
throw e
})
})
Expand Down
Loading

0 comments on commit 840822d

Please sign in to comment.