You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have dependencies (things we need when running the code), and we have dev dependencies (things we need when writing the code, e.g., TypeScript).
TypeScript is specified as a dev dependency (as it should be), meaning we shouldn't install it when building Wasp for production. The same goes for nodemon, @types packages, etc. One can usually avoid installing dev dependencies by running the command npm install --production (this creates a "production build).
Wasp does not make this distinction, it always calls the same code which ends up calling the regular npm install, regardless of the Wasp command at hand (start, build, compile, ...).
To make Wasp production ready, we must:
Start treating dev dependencies differently than regular dependencies
Put each dependency into the appropriate category (e.g. TypeScript is a dev dependency, Express is a regular dependency)
Ensure our code can run without any dev dependencies (e.g., we currently don't compile TypeScript when building for production)
While we're at it, we should probably take care of #456 too.
The text was updated successfully, but these errors were encountered:
Martinsos
changed the title
Implement proper production support
Fix how we build generated project for production (dev deps)
Dec 22, 2022
Summary:
npm install --production
(this creates a "production build).npm install
, regardless of the Wasp command at hand (start
,build
,compile
, ...).To make Wasp production ready, we must:
While we're at it, we should probably take care of #456 too.
The text was updated successfully, but these errors were encountered: