Replies: 1 comment 11 replies
-
Because npm does not give us any way to mark "development" vs "production", so there's no differentiation between what should be needed in production vs development. If you want the Next.js app to run without node_modules and only the deps needed for the app you can use the new experimental flag |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Run
next info
(available from version 12.0.8 and up)What version of Next.js are you using?
12.0.8
What version of Node.js are you using?
14.18.1
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
other
Describe the Bug
When installing a production install using
yarn install --frozen-lockfile --production
The size of Next.js is 77M,
when
@next
size is basically due toswc
.Why it got installed in production installation?
Expected Behavior
swc
should not be installed in production installation.To Reproduce
make an empty folder with the following
package.json
:And run
yarn install --frozen-lockfile --production
Beta Was this translation helpful? Give feedback.
All reactions