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

docs: add comments to install all modules when devDeps is ignored by default #1448

Merged
merged 1 commit into from Nov 11, 2022

Conversation

unix
Copy link
Contributor

@unix unix commented Nov 11, 2022

Why this changes

When we want to reduce the image size of a NodeJS project and set the NODE_ENV to production before install, the package manager will ignore devDependencies. This is in line with expected behavior.

However, in the current JavaScript ecosystem, where most projects require the use of scaffolding from devDependencies for the bundle (or compile), ignoring dependencies when building images can cause user deployments to fail. For users who lack experience with package managers, this cause is hard to spot.

Description of the changes

Reducing the size of the image reduces the deployment time for users and for some users does not require any changes in settings, which is correct, no changes are required.

Add additional comments to get a hint when the user tries to change the Dockerfile to resolve the error.

Needs to review

I'm not quite sure if the comments in the template will respect the conditional statement, if it doesn't work we can remove the conditional statement.

Refs

@rubys rubys merged commit 0008ce0 into superfly:master Nov 11, 2022
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.

None yet

2 participants