File tree Expand file tree Collapse file tree 4 files changed +15
-16
lines changed
Expand file tree Collapse file tree 4 files changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ catalogs:
5555 cac : ^6.7.14
5656 empathic : ^2.0.0
5757 hookable : ^5.5.3
58- import-without-cache : ^0.1.3
58+ import-without-cache : ^0.2.0
5959 is-in-ci : ^2.0.0
6060 obug : ^2.1.1
6161 package-manager-detector : ^1.6.0
Original file line number Diff line number Diff line change @@ -142,16 +142,15 @@ export async function loadConfigFile(
142142
143143type Parser = 'native' | 'unrun'
144144
145+ const isBun = ! ! process . versions . bun
146+ const nativeTS = process . features . typescript || process . versions . deno
147+ const autoLoader = isBun || ( nativeTS && isSupported ) ? 'native' : 'unrun'
148+
145149function resolveConfigLoader (
146150 configLoader : InlineConfig [ 'configLoader' ] = 'auto' ,
147151) : Parser {
148152 if ( configLoader === 'auto' ) {
149- const nativeTS = ! ! (
150- process . features . typescript ||
151- process . versions . bun ||
152- process . versions . deno
153- )
154- return nativeTS && isSupported ? 'native' : 'unrun'
153+ return autoLoader
155154 } else {
156155 return configLoader === 'native' ? 'native' : 'unrun'
157156 }
@@ -186,7 +185,7 @@ async function nativeImport(id: string) {
186185 if ( isSupported ) {
187186 importAttributes . cache = 'no'
188187 init ( )
189- } else {
188+ } else if ( ! isBun ) {
190189 url . searchParams . set ( 'no-cache' , crypto . randomUUID ( ) )
191190 }
192191
Original file line number Diff line number Diff line change 11import path from 'node:path'
22import { fileURLToPath } from 'node:url'
33import { bold , green } from 'ansis'
4- import { clearCJSCache } from 'import-without-cache'
4+ import { clearRequireCache } from 'import-without-cache'
55import {
66 build as rolldownBuild ,
77 watch as rolldownWatch ,
@@ -62,7 +62,7 @@ export async function build(
6262 restarting = true
6363
6464 await Promise . all ( disposeCbs . map ( ( cb ) => cb ( ) ) )
65- clearCJSCache ( )
65+ clearRequireCache ( )
6666 build ( userOptions )
6767 }
6868
You can’t perform that action at this time.
0 commit comments