Skip to content

feat: remove Next.js peer dependency and update DynamicLink component#778

Merged
cakeinpanic merged 2 commits into
lido-ui-v4-canaryfrom
feature/we-2278-remove-nextjs-peer-dependency-from-ui-library
May 26, 2026
Merged

feat: remove Next.js peer dependency and update DynamicLink component#778
cakeinpanic merged 2 commits into
lido-ui-v4-canaryfrom
feature/we-2278-remove-nextjs-peer-dependency-from-ui-library

Conversation

@cakeinpanic
Copy link
Copy Markdown
Contributor

No description provided.

@cakeinpanic cakeinpanic requested a review from a team as a code owner May 21, 2026 07:53
@preview-stands
Copy link
Copy Markdown

preview-stands Bot commented May 21, 2026

Preview stand status

Stand was demolished

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the Next.js dependency from the library and updates the Link/DynamicLink components to default to native <a> rendering while allowing consumers to optionally supply a Next-compatible link component.

Changes:

  • Removed next from peerDependencies/devDependencies and pruned Next-related entries from yarn.lock.
  • Updated Link and DynamicLink to support an optional useNextLink + nextLinkComponent integration instead of importing next/link.
  • Updated/added Storybook stories to demonstrate the new optional Next-compatible integration.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
yarn.lock Removes Next.js and its transitive dependencies from the lockfile.
rollup.config.mjs Removes Next-specific externals and the Next import-rewrite plugin.
packages/links/link/Link.tsx Replaces direct next/link usage with optional injected Next-compatible link component support.
packages/links/link/Link.stories.tsx Updates docs and adds a mock Next-like link example.
packages/links/dynamic-link/DynamicLink.tsx Removes next/link dependency and adds optional injected Next-compatible link component support.
packages/links/dynamic-link/DynamicLink.stories.tsx Adds Storybook coverage for DynamicLink including optional Next-like component usage.
package.json Removes next from peer/dev dependencies to decouple the library from Next.js.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/links/dynamic-link/DynamicLink.tsx
Comment thread packages/links/dynamic-link/DynamicLink.tsx
Comment thread packages/links/link/Link.tsx
@cakeinpanic cakeinpanic merged commit 0856b81 into lido-ui-v4-canary May 26, 2026
12 checks passed
@cakeinpanic cakeinpanic deleted the feature/we-2278-remove-nextjs-peer-dependency-from-ui-library branch May 26, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants