Visitar URL original
perf: remove `asyncDispose` polyfill · rolldown/tsdown@826755e · GitHub
Skip to content

Commit 826755e

Browse files
committed
perf: remove asyncDispose polyfill
1 parent 40c405c commit 826755e

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎src/build.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ import {
3434
import { debounce, typeAssert } from './utils/general.ts'
3535
import { globalLogger } from './utils/logger.ts'
3636

37-
const asyncDispose: typeof Symbol.asyncDispose =
38-
Symbol.asyncDispose || Symbol.for('Symbol.asyncDispose')
39-
4037
/**
4138
* Build with tsdown.
4239
*/
@@ -109,7 +106,7 @@ export async function buildWithConfigs(
109106
// Watch mode with shortcuts
110107
disposeCbs.push(shortcuts(restart))
111108
for (const bundle of bundles) {
112-
disposeCbs.push(bundle[asyncDispose])
109+
disposeCbs.push(bundle[Symbol.asyncDispose])
113110
}
114111
} else if (firstDevtoolsConfig) {
115112
typeAssert(firstDevtoolsConfig.devtools)
@@ -157,7 +154,7 @@ async function buildSingle(
157154
chunks,
158155
config,
159156
inlinedDeps: new Map(),
160-
async [asyncDispose]() {
157+
async [Symbol.asyncDispose]() {
161158
debouncedPostBuild.cancel()
162159
ab?.abort()
163160
await watcher?.close()

0 commit comments

Comments
 (0)