Skip to content

Commit a95673c

Browse files
authored
Replace ES6 export with node export (#135)
While ES6 loaders that are back-compatible with node modules will treat this the same, this improves the situation for uses or node and flow. Fixes #85
1 parent cc0c62b commit a95673c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export type CacheMap<K, V> = {
4141
* different access permissions and consider creating a new instance per
4242
* web request.
4343
*/
44-
export default class DataLoader<K, V> {
44+
class DataLoader<K, V> {
4545
constructor(
4646
batchLoadFn: BatchLoadFn<K, V>,
4747
options?: Options<K, V>
@@ -337,3 +337,5 @@ type LoaderQueue<K, V> = Array<{
337337
resolve: (value: V) => void;
338338
reject: (error: Error) => void;
339339
}>;
340+
341+
module.exports = DataLoader;

0 commit comments

Comments
 (0)