@@ -361,7 +361,10 @@ export function oxcPlugin(config: ResolvedConfig): Plugin {
361
361
async handler ( id , _importer , opts ) {
362
362
if ( ! id . startsWith ( '@babel/runtime/' ) ) return
363
363
364
- if ( id === '@babel/runtime/helpers/decorateParam' ) {
364
+ if (
365
+ id === '@babel/runtime/helpers/decorate' ||
366
+ id === '@babel/runtime/helpers/decorateParam'
367
+ ) {
365
368
return id
366
369
}
367
370
@@ -383,6 +386,29 @@ export function oxcPlugin(config: ResolvedConfig): Plugin {
383
386
384
387
export { __decorateParam as default };`
385
388
}
389
+ if ( id === '@babel/runtime/helpers/decorate' ) {
390
+ return `function __decorate(decorators, target, key, desc) {
391
+ var c = arguments.length,
392
+ r =
393
+ c < 3
394
+ ? target
395
+ : desc === null
396
+ ? (desc = Object.getOwnPropertyDescriptor(target, key))
397
+ : desc,
398
+ d;
399
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
400
+ r = Reflect.decorate(decorators, target, key, desc);
401
+ else
402
+ for (var i = decorators.length - 1; i >= 0; i--)
403
+ if ((d = decorators[i]))
404
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
405
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
406
+ }
407
+
408
+ (module.exports = __decorate),
409
+ (module.exports.__esModule = true),
410
+ (module.exports["default"] = module.exports);`
411
+ }
386
412
} ,
387
413
} ,
388
414
async transform ( code , id ) {
0 commit comments