-
-
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
fix: add router UMD build for unpkg #9446
Conversation
🦋 Changeset detectedLatest commit: 2275037 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -86,7 +86,7 @@ module.exports = function rollup() { | |||
banner: createBanner("React Router DOM v5 Compat", version), | |||
globals: { | |||
history: "HistoryLibrary", | |||
"@remix-run/router": "Router", | |||
"@remix-run/router": "RemixRouter", |
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.
The UMD name for the build is RemixRouter
for clarity - Router
felt a bit vague 😄
"react-router", | ||
"@remix-run/router", | ||
], | ||
external: ["react", "react-dom", "react-router", "@remix-run/router"], |
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.
react-router-dom
no longer depends on history
so it can be removed from external
and globals
@@ -26,7 +26,7 @@ module.exports = function rollup() { | |||
sourcemap: !PRETTY, | |||
banner: createBanner("React Router", version), | |||
}, | |||
external: ["history", "@remix-run/router", "react"], | |||
external: ["@remix-run/router", "react"], |
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.
Same for react-router
, no longer depends on history
getRollupConfig("esm", "router.js", { includeTypesAndCopy: true }), | ||
getRollupConfig("cjs", "router.cjs.js"), | ||
getRollupConfig("umd", "router.umd.js"), | ||
getRollupConfig("umd", "router.umd.min.js", { minify: true }), |
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.
Add dev and prod UMD builds for @remix-run/router
Adds a UMD build for
@remix-run/router
since that's needed for unpkg/UMD usage ofreact-router
/react-router-dom
Closes #9240