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

Unused dependencies in standalone build using storybook #65444

Open
andrea-benato-deltatre opened this issue May 7, 2024 · 0 comments
Open
Labels
bug Issue was opened via the bug report template. Module Resolution Module resolution (CJS / ESM, module resolving) Output (export/standalone) Related to the the output option in `next.config.js`.

Comments

@andrea-benato-deltatre
Copy link

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/competent-shirley-zg6rwr

To Reproduce

  • build the application using pnpm build
  • goes in .next/standalone/node_modules/.pnpm

Current vs. Expected behavior

Right now you can find some storybook "related" dependencies like "esbuild" which are leading to vulnerabilities and unused (because they are devDeps) in production code.
Expect to not find them

Provide environment information

Operating System
   Platform: windows
   Architecture x86-64
   Version: 11
Binaries:
   Node: 20.12.2
   Npm: 10.5.0
   pnpm: 9.1.0

Which area(s) are affected? (Select all that apply)

Module Resolution, Output (export/standalone)

Which stage(s) are affected? (Select all that apply)

next build (local), Other (Deployed)

Additional context

I tested in both v,14,2,3 and 14,1,4

@andrea-benato-deltatre andrea-benato-deltatre added the bug Issue was opened via the bug report template. label May 7, 2024
@github-actions github-actions bot added Module Resolution Module resolution (CJS / ESM, module resolving) Output (export/standalone) Related to the the output option in `next.config.js`. labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Module Resolution Module resolution (CJS / ESM, module resolving) Output (export/standalone) Related to the the output option in `next.config.js`.
Projects
None yet
Development

No branches or pull requests

1 participant