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

feat(bundling): upgrade rollup to v4 #22656

Merged
merged 1 commit into from
Apr 19, 2024
Merged

feat(bundling): upgrade rollup to v4 #22656

merged 1 commit into from
Apr 19, 2024

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Apr 3, 2024

This PR bumps Rollup to v4, and updates necessary plugins to support the update. The previous rollup-plugin-peer-deps-external plugin is removed since it is no longer needed.

We should wait until Nx 19 to merge this since this could be a breaking change if users have custom Rollup plugins that are incompatible with Rollup v4.

Changes:

  • Update Rollup to v4
  • Update Rollup plugins to be compatible with v4
  • Add migration for React projects that use @rollup/plugin-url and @svgr/rollup

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #22604

@jaysoo jaysoo self-assigned this Apr 3, 2024
@jaysoo jaysoo requested review from a team as code owners April 3, 2024 18:20
Copy link

vercel bot commented Apr 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Apr 19, 2024 2:00am

@@ -172,7 +174,7 @@ describe('Rollup Plugin', () => {
);
updateFile(`libs/test/package.json`, JSON.stringify({ name: 'test' }));
updateFile(
`libs/test/rollup.config.js`,
`libs/test/rollup.config.mjs`,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rollup v2 must have been doing something to process the file, but with v4 it is using Node resolution so the file must be .mjs or the workspace needs type: 'module' in package.json.

@jaysoo jaysoo enabled auto-merge (squash) April 19, 2024 02:07
@jaysoo jaysoo disabled auto-merge April 19, 2024 02:07
@jaysoo jaysoo merged commit 5e08b15 into master Apr 19, 2024
6 checks passed
@jaysoo jaysoo deleted the rollup_upgrade branch April 19, 2024 02:08
AgentEnder pushed a commit to AgentEnder/nx that referenced this pull request Apr 23, 2024
Copy link

github-actions bot commented May 2, 2024

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Rollup] Update rollup version to 4
2 participants