File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ export function createIdResolver(
7474 idOnly : true ,
7575 } ,
7676 environment . config ,
77+ true ,
7778 ) ,
7879 ] ,
7980 undefined ,
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ const perEnvironmentOrWorkerPlugin = (
223223export function oxcResolvePlugin (
224224 resolveOptions : ResolvePluginOptionsWithOverrides ,
225225 overrideEnvConfig : ( ResolvedConfig & ResolvedEnvironmentOptions ) | undefined ,
226+ isJsPluginContainer = false ,
226227) : Plugin [ ] {
227228 return [
228229 ...( resolveOptions . optimizeDeps && ! resolveOptions . isBuild
@@ -358,10 +359,12 @@ export function oxcResolvePlugin(
358359 } )
359360 } ,
360361
361- ...( partialEnv . config . command === 'serve'
362+ ...( partialEnv . config . command === 'serve' || isJsPluginContainer
362363 ? {
363364 async onWarn ( msg ) {
364- getEnv ( ) . logger . warn ( `warning: ${ msg } ` , {
365+ // use `partialEnv` instead of `getEnv()` because `buildStart` is
366+ // not called for plugin container used by `createIdResolver`
367+ partialEnv . config . logger . warn ( `warning: ${ msg } ` , {
365368 clear : true ,
366369 timestamp : true ,
367370 } )
You can’t perform that action at this time.
0 commit comments