Skip to content

Commit

Permalink
Fix: add universal export to root (#57)
Browse files Browse the repository at this point in the history
* fix: add `universal` export to root

* Update package.json

* Update package.json

* Update universal.js

* Update universal.js

* Update universal.js

Co-authored-by: 唯然 <[email protected]>

* typos

Co-authored-by: 唯然 <[email protected]>
  • Loading branch information
SimenB and aladdin-add authored Oct 14, 2021
1 parent 69e1840 commit 6b5fc8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"lib",
"conf",
"LICENSE",
"dist"
"dist",
"universal.js"
],
"publishConfig": {
"access": "public"
Expand Down
9 changes: 9 additions & 0 deletions universal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Jest (and probably some other runtimes with custom implementations of
// `require`) doesn't support `exports` in `package.json`, so this file is here
// to help them load this module. Note that it is also `.js` and not `.cjs` for
// the same reason - `cjs` files requires to be loaded with an extension, but
// since Jest doesn't respect `module` outside of ESM mode it still works in
// this case (and the `require` in _this_ file does specify the extension).

// eslint-disable-next-line no-undef
module.exports = require("./dist/eslintrc-universal.cjs");

0 comments on commit 6b5fc8b

Please sign in to comment.