Overview
The Service Orders Management System uses Nuxt 3, which provides flexible build options for different deployment scenarios. You can create either a server-side rendered (SSR) application or a statically generated site.Build Commands
The application includes several build-related scripts defined inpackage.json:
Available Build Scripts
SSR Build (Default)
The This generates a
build command creates a production-ready SSR application:package.json
.output directory containing:- Server-side code for handling requests
- Client-side assets (JavaScript, CSS)
- Optimized and tree-shaken bundles
Static Generation
For static hosting, use the This pre-renders all routes and generates a fully static site in the
generate command:package.json
.output/public directory.SSR vs Static Generation
When to Use SSR Build
Choosenuxt build for:
- Dynamic content that changes frequently
- User-specific content and authentication
- Real-time data from APIs
- Server-side logic and middleware
When to Use Static Generation
Choosenuxt generate for:
- Content that doesn’t change often
- Better performance (no server processing)
- Lower hosting costs
- CDN distribution
Build Output
After running either build command, you’ll find the output in the.output directory:
Optimization Tips
Enable Production Mode
Ensure This enables:
NODE_ENV=production is set during build:- Minification of JavaScript and CSS
- Tree-shaking to remove unused code
- Production optimizations in Vue and Nuxt
Analyze Bundle Size
Add the This opens a visual report showing which modules contribute to bundle size.
--analyze flag to inspect bundle composition:Optimize Images
The application uses
@nuxt/image for automatic image optimization. Ensure images are properly configured to leverage:- Lazy loading
- Responsive sizing
- Modern format conversion (WebP, AVIF)
Build Process
- Preparation: Run
nuxt prepare(automatically runs afternpm installviapostinstallscript) - TypeScript Check: Type checking is performed during build
- Module Processing: All Nuxt modules are initialized and configured
- Vite Build: Client and server code are bundled
- Optimization: Code splitting, minification, and tree-shaking
- Output Generation: Final artifacts written to
.output
Next Steps
Environment Configuration
Configure runtime settings and API endpoints for different environments