[bug]: external dependency is included in output

Open
#77 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale

Research direction

Reproduce the issue in strapi-plugin-navigation with yarn followed by yarn build, which uses strapi-plugin build. Start by tracing the build configuration in @strapi/sdk-plugin and/or @strapi/pack-up, then inspect dist/admin/index.js and dist/admin/index.mjs. Done means lodash and other dependencies are external rather than bundled into those outputs.

Written by the indexing model from the issue text.

Description

issue: bug
What version of @strapi/sdk-plugin are you using?
  • NPM 11
  • Node 22
  • React 18.3.1
  • @strapi/sdk-plugin 5.3.0
What's Wrong?

I noticed that the admin build of strapi-plugin-navigation includes the entire lodash dependency. I think this related to some kind of configuration in @strapi/sdk-plugin and/or @strapi/pack-up.

See https://github.com/VirtusLab-Open-Source/strapi-plugin-navigation/issues/509 for more discussion.

To Reproduce
  1. Checkout https://github.com/VirtusLab-Open-Source/strapi-plugin-navigation
  2. yarn + yarn build (which uses strapi-plugin build)
  3. Notice that dist/admin/index.js and dist/admin/index.mjs contain the source of the lodash dependency.
Expected Behaviour

All dependencies should be external.

Dominant language
TypeScript
Stars
24
Forks
13
Avg merge
5d 3h
Merged PRs (30d)
5

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from strapi/sdk-plugin

All issues in strapi/sdk-plugin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.