Skip to content
This repository was archived by the owner on Dec 22, 2020. It is now read-only.

Commit 4ea50ec

Browse files
authored
feat: interop between commonjs and es6 modules
1 parent 8404959 commit 4ea50ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Author Tobias Koppers @sokra
44
*/
55
var JSON5 = require('json5');
6-
module.exports = function Json5Plugin (source) {
6+
function Json5Plugin (source) {
77
if (this.cacheable) {
88
this.cacheable();
99
}
@@ -20,3 +20,7 @@ module.exports = function Json5Plugin (source) {
2020

2121
return 'module.exports = ' + JSON.stringify(value, null, '\t');
2222
}
23+
// es2015 modules support
24+
Json5Plugin.default = Json5Plugin;
25+
26+
module.exports = Json5Plugin;

0 commit comments

Comments
 (0)