Skip to content

Commit 29a7cc7

Browse files
committed
chore: update scanner tsconfig comment
1 parent b7f34b3 commit 29a7cc7

File tree

1 file changed

+1
-15
lines changed
  • packages/vite/src/node/optimizer

1 file changed

+1
-15
lines changed

packages/vite/src/node/optimizer/scan.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -268,22 +268,8 @@ async function prepareRolldownScanner(
268268
const { plugins: pluginsFromConfig = [], ...rollupOptions } =
269269
environment.config.optimizeDeps.rollupOptions ?? {}
270270

271-
// TODO: enableDecorators when needed, wait for rolldown option
272271
// The plugin pipeline automatically loads the closest tsconfig.json.
273-
// But esbuild doesn't support reading tsconfig.json if the plugin has resolved the path (https://github.com/evanw/esbuild/issues/2265).
274-
// Due to syntax incompatibilities between the experimental decorators in TypeScript and TC39 decorators,
275-
// we cannot simply set `"experimentalDecorators": true` or `false`. (https://github.com/vitejs/vite/pull/15206#discussion_r1417414715)
276-
// Therefore, we use the closest tsconfig.json from the root to make it work in most cases.
277-
// let tsconfigRaw = esbuildOptions.tsconfigRaw
278-
// if (!tsconfigRaw && !esbuildOptions.tsconfig) {
279-
// const { tsconfig } = await loadTsconfigJsonForFile(
280-
// path.join(environment.config.root, '_dummy.js'),
281-
// )
282-
// if (tsconfig.compilerOptions?.experimentalDecorators) {
283-
// tsconfigRaw = { compilerOptions: { experimentalDecorators: true } }
284-
// }
285-
// }
286-
272+
// Rolldown reads the tsconfig.json when a ts file is passed to it.
287273
const plugins = await asyncFlatten(arraify(pluginsFromConfig))
288274

289275
plugins.push(...rolldownScanPlugin(environment, deps, missing, entries))

0 commit comments

Comments
 (0)