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 router UMD build for unpkg #9446

Merged
merged 4 commits into from
Oct 17, 2022
Merged

Conversation

brophdawg11
Copy link
Contributor

Adds a UMD build for @remix-run/router since that's needed for unpkg/UMD usage of react-router/react-router-dom

Closes #9240

@changeset-bot
Copy link

changeset-bot bot commented Oct 11, 2022

🦋 Changeset detected

Latest commit: 2275037

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@remix-run/router Patch
react-router Patch
react-router-dom Patch
react-router-dom-v5-compat Patch
react-router-native Patch

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",
Copy link
Contributor Author

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"],
Copy link
Contributor Author

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"],
Copy link
Contributor Author

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 }),
Copy link
Contributor Author

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

@brophdawg11 brophdawg11 merged commit 9cf02f3 into dev Oct 17, 2022
@brophdawg11 brophdawg11 deleted the brophdawg11/router-umd-build branch October 17, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: 6.4 release changed folder structure? UNPKG links broke a few minutes ago
3 participants