Skip to content

Commit

Permalink
fix: amend CommonJS output to be compatible with require (#36)
Browse files Browse the repository at this point in the history
Add `module.exports = module.exports.default;` at the end of the CJS file.
Example:

```js
const ruleset = require('@apisyouwonthate/style-guide');
```
  • Loading branch information
leosuncin committed Sep 22, 2022
1 parent 25f37f1 commit d5828bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
"dts": true,
"format": ["cjs", "esm"],
"sourcemap": true,
"noExternal": ["@stoplight/types"]
"noExternal": ["@stoplight/types"],
"footer": {
"js": "module.exports = module.exports.default;"
}
}
}

0 comments on commit d5828bc

Please sign in to comment.