Skip to content

fix(cli): omit heavy devDependencies for local plugins to reduce node_modules size#203

Open
singhlovepreet9 wants to merge 2 commits into
strapi:mainfrom
singhlovepreet9:fix-local-plugin-size-22946
Open

fix(cli): omit heavy devDependencies for local plugins to reduce node_modules size#203
singhlovepreet9 wants to merge 2 commits into
strapi:mainfrom
singhlovepreet9:fix-local-plugin-size-22946

Conversation

@singhlovepreet9

Copy link
Copy Markdown

Fixes strapi/strapi#22946

This PR modifies the sdk-plugin so that when it runs inside a Strapi project (isStrapiProject is true), it completely omits heavy devDependencies like @types/react, react-dom, styled-components, typescript, @strapi/design-system, @strapi/icons etc.

These packages are already available in the root of the monorepo workspace for a Strapi project, so they do not need to be duplicated in the local plugin's devDependencies.

This significantly reduces the size of a local plugin's node_modules (from ~300+MB to a few KB if the user runs npm install inside the plugin directory), and stops high server memory consumption during builds caused by duplicated module resolution.

@changeset-bot

changeset-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: de7b316

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4f7bb033-5c04-4eb9-9955-12d03c0259f5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@singhlovepreet9
singhlovepreet9 marked this pull request as ready for review July 14, 2026 10:46
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.

Strapi 5 local plugins : size has significantly increased

1 participant