File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export function getEsbuildPlugin<UserOptions = Record<string, never>>(
68
68
loader . onLoadCb = callback
69
69
} ,
70
70
onTransform ( _options , callback ) {
71
- loader . options ||= _options
71
+ loader . options = loader . options || _options
72
72
loader . onTransformCb = callback
73
73
} ,
74
74
} as EsbuildPluginBuild )
@@ -95,7 +95,7 @@ export function getEsbuildPlugin<UserOptions = Record<string, never>>(
95
95
break
96
96
}
97
97
98
- result ||= { }
98
+ result = result || { }
99
99
100
100
for ( const { options, onTransformCb } of loaders ) {
101
101
if ( ! checkFilter ( options ) )
@@ -105,7 +105,7 @@ export function getEsbuildPlugin<UserOptions = Record<string, never>>(
105
105
// caution: 'utf8' assumes the input file is not in binary.
106
106
// if you want your plugin handle binary files, make sure to
107
107
// `plugin.load()` them first.
108
- result . contents ||= await fs . promises . readFile ( args . path , 'utf8' )
108
+ result . contents = result . contents || await fs . promises . readFile ( args . path , 'utf8' )
109
109
110
110
const _result = await onTransformCb ( {
111
111
...result ,
You can’t perform that action at this time.
0 commit comments