feat: remove Next.js peer dependency and update DynamicLink component#778
Merged
cakeinpanic merged 2 commits intoMay 26, 2026
Conversation
Preview stand statusStand was demolished |
There was a problem hiding this comment.
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
nextfrompeerDependencies/devDependenciesand pruned Next-related entries fromyarn.lock. - Updated
LinkandDynamicLinkto support an optionaluseNextLink + nextLinkComponentintegration instead of importingnext/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.
…usage Agent-Logs-Url: https://github.com/lidofinance/ui/sessions/119080d0-1a13-43d3-9a64-dcf8ff824ab0 Co-authored-by: cakeinpanic <588916+cakeinpanic@users.noreply.github.com>
molok0aleks99
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.