Skip to content

Commit 14b49e5

Browse files
authored
fix: cjs fix for SERVICE from @feathersjs/feathers (#8)
1 parent b210fa0 commit 14b49e5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/feathers-cjs-fix.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// src/feathers.ts
2+
import * as feathers from '@feathersjs/feathers'
3+
4+
// Type-safe re-export of only what you need
5+
export const SERVICE = (feathers as any).SERVICE || feathers.default?.SERVICE

src/utils/get-exposed-methods/get-exposed-methods.util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Service } from '@feathersjs/feathers'
2-
import { SERVICE } from '@feathersjs/feathers'
2+
import { SERVICE } from '../../feathers-cjs-fix.js'
33

44
/**
55
* Little helper to get methods are publicly exposed by a service.

0 commit comments

Comments
 (0)