Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: add universal export to root #57

Merged
merged 7 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 8 additions & 0 deletions universal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Jest (and probably other some other runtimes with custom implementations of
// `require`) doesn't support `exports` in package.json, so this file lets 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 loaded with an extension, but
// since and doesn't respect `module` outside of ESM mode it still works in
// this case (and the `require` in _this_ file does specify the extension).

module.exports = require("./dist/eslintrc-universal.cjs");