Skip to content

Commit a1247dc

Browse files
committed
dual compatibility wihtout using default
1 parent 12737ff commit a1247dc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,14 @@ class Codebolt {
144144
}
145145
}
146146

147-
export default new Codebolt();
147+
const codebolt = new Codebolt();
148+
149+
// For ES6 modules (import)
150+
export default codebolt;
151+
152+
// For CommonJS compatibility (require)
153+
module.exports = codebolt;
154+
module.exports.default = codebolt;
148155

149156

150157

0 commit comments

Comments
 (0)