-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Description / Steps to reproduce / Feature proposal
As a developer I want a minimal necessary (as in bytes and number of dependencies) package of my loopback service for deployment.
docker run -ti node:alpine shnpm i -g @loopback/clilb4 poc# Selecting all defaults by pressing Entercd pocnpm run buildrm -rf node_modules# To ensure no dev cruftnpm install --only=production
Current Behavior
du -sh node_modules is over 70M
Expected Behavior
I would have expected du -sh node_modules to be a few megs...10 at most?
du -s node_modules/* | sort -rn | head reveals node_modules/typescript (dependency of @loopback/openapi-v3) takes almost half that space.
Plus couple other random pics:
node_modules/loopback-datasource-juggler/test1Mbnode_modules/strong-globalize4Mbnode_modules/@loopback/*modules contain unnecessary:- api-docs
- src
A release/production build should not include test files, src files, module documentation files, build time utilities (eg typescript), dependencies that I don't use in my API service (eg globalization).
Action items
- get rid of typescript dependencies Replace type definition being imported by
repository-json-schema#1132 - refactor strong-globalize: has too many dependencies strongloop/strong-globalize#97
- update dependencies to use the new smaller version of strong-globalize
- remove apidocs from production build
- get rid of nyc output
Metadata
Metadata
Assignees
Labels
No labels