Build Deployment
Laratype separates the development and production environments to ensure optimal performance and security. The build process will compile TypeScript source code to JavaScript and optimize the necessary resources for deployment.
Therefore, when deploying a Laratype application, you need to perform the build process before deploying the application to the production environment.
You won't need to install TypeScript or other development tools on the production environment, helping to minimize application size and enhance security.
Additionally, you can remove sauf from dependencies in package.json to further reduce the application size.
Performing Build
$ npx sauf build$ pnpx sauf build$ yarn sauf build$ bunx sauf buildStarting the Application
After the build is complete, you can start the application from the dist directory using Node.js, or use the saufx command.
$ npm run saufx build$ pnpm saufx build$ yarn saufx build$ bun saufx buildUsing CLI
Unnecessary CLI commands like (make:...) will not be bundled, helping to reduce application size. You can use them via the saufx command.
$ npm run saufx <command-name>$ pnpm saufx <command-name>$ yarn saufx <command-name>$ bun saufx <command-name>