File tree Expand file tree Collapse file tree 2 files changed +30
-16
lines changed Expand file tree Collapse file tree 2 files changed +30
-16
lines changed Original file line number Diff line number Diff line change @@ -214,22 +214,18 @@ describe('file url', () => {
214
214
expect ( resolved ) . toBeNull ( )
215
215
} )
216
216
217
- // skip for native plugin because logs are not output (https://github.com/rolldown/rolldown/issues/4290)
218
- test . skipIf ( ! ! process . env . _VITE_TEST_NATIVE_PLUGIN ) (
219
- 'non declared node builtin' ,
220
- async ( ) => {
221
- await expect (
222
- run ( {
223
- builtins : [
224
- /* empty */
225
- ] ,
226
- idToResolve : 'node:fs' ,
227
- } ) ,
228
- ) . rejects . toThrowError (
229
- / w a r n i n g : A u t o m a t i c a l l y e x t e r n a l i z e d n o d e b u i l t - i n m o d u l e " n o d e : f s " / ,
230
- )
231
- } ,
232
- )
217
+ test ( 'non declared node builtin' , async ( ) => {
218
+ await expect (
219
+ run ( {
220
+ builtins : [
221
+ /* empty */
222
+ ] ,
223
+ idToResolve : 'node:fs' ,
224
+ } ) ,
225
+ ) . rejects . toThrowError (
226
+ / w a r n i n g : A u t o m a t i c a l l y e x t e r n a l i z e d n o d e b u i l t - i n m o d u l e " n o d e : f s " / ,
227
+ )
228
+ } )
233
229
234
230
test ( 'default to node-like builtins' , async ( ) => {
235
231
const resolved = await run ( {
Original file line number Diff line number Diff line change @@ -348,6 +348,24 @@ export function oxcResolvePlugin(
348
348
options . scan = scan
349
349
return resolveSubpathImports ( id , importer , options )
350
350
} ,
351
+
352
+ ...( partialEnv . config . command === 'serve'
353
+ ? {
354
+ async onWarn ( msg ) {
355
+ getEnv ( ) . logger . warn ( `warning: ${ msg } ` , {
356
+ clear : true ,
357
+ timestamp : true ,
358
+ } )
359
+ } ,
360
+ }
361
+ : { } ) ,
362
+ ...( debug
363
+ ? {
364
+ async onDebug ( message ) {
365
+ debug ( message )
366
+ } ,
367
+ }
368
+ : { } ) ,
351
369
} )
352
370
} ,
353
371
) ,
You can’t perform that action at this time.
0 commit comments