-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Add exports field to all packages #11675
Changes from all commits
8892562
3a25d7f
095c270
3e3731b
fe7bf6c
66c0262
3bf46a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@react-router/express": major | ||
"@react-router/serve": major | ||
"@react-router/node": major | ||
"@react-router/dev": major | ||
"react-router-dom": major | ||
"react-router": major | ||
--- | ||
|
||
Add `exports` field to all packages |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { installGlobals } from "./globals"; | ||
|
||
installGlobals(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,22 @@ | |
"license": "MIT", | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to add an ESM build to fix a dual-package-hazard issue. In the |
||
"require": "./dist/index.js" | ||
}, | ||
"./install": { | ||
"types": "./dist/install.d.ts", | ||
"import": "./dist/install.mjs", | ||
"require": "./dist/install.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"sideEffects": [ | ||
"./install.js" | ||
"./dist/install.js", | ||
"./dist/install.mjs" | ||
], | ||
"scripts": { | ||
"tsc": "tsc" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to use the
mjs
extension now to prevent this file being resolved as CJS via theimport
field withinexports
.