|
| 1 | +import { defineConfig } from './src/config'; |
| 2 | +import crmConfig from '@object-ui/example-crm/objectstack.config'; |
| 3 | +import todoConfig from '@object-ui/example-todo/objectstack.config'; |
| 4 | + |
| 5 | +export default defineConfig({ |
| 6 | + // ============================================================================ |
| 7 | + // Project Metadata |
| 8 | + // ============================================================================ |
| 9 | + |
| 10 | + name: '@object-ui/example-msw-object-form', |
| 11 | + version: '0.1.0', |
| 12 | + description: 'ObjectUI Example: MSW Object Form (Wrapper)', |
| 13 | + |
| 14 | + // ============================================================================ |
| 15 | + // Build Settings |
| 16 | + // ============================================================================ |
| 17 | + |
| 18 | + build: { |
| 19 | + outDir: './dist', |
| 20 | + sourcemap: true, |
| 21 | + minify: true, |
| 22 | + target: 'node18', |
| 23 | + }, |
| 24 | + |
| 25 | + // ============================================================================ |
| 26 | + // Database Configuration |
| 27 | + // ============================================================================ |
| 28 | + |
| 29 | + datasources: { |
| 30 | + default: { |
| 31 | + driver: 'memory', // Use memory driver for browser example |
| 32 | + }, |
| 33 | + }, |
| 34 | + |
| 35 | + // ============================================================================ |
| 36 | + // Plugin Configuration |
| 37 | + // ============================================================================ |
| 38 | + |
| 39 | + plugins: [ |
| 40 | + '@objectstack/plugin-msw' // In core config |
| 41 | + ], |
| 42 | + |
| 43 | + // ============================================================================ |
| 44 | + // Merged Stack Configuration (CRM + Todo) |
| 45 | + // ============================================================================ |
| 46 | + objects: [ |
| 47 | + ...(crmConfig.objects || []), |
| 48 | + ...(todoConfig.objects || []) |
| 49 | + ], |
| 50 | + apps: [ |
| 51 | + ...(crmConfig.apps || []), |
| 52 | + ...(todoConfig.apps || []) |
| 53 | + ], |
| 54 | + manifest: { |
| 55 | + data: [ |
| 56 | + ...(crmConfig.manifest?.data || []), |
| 57 | + ...(todoConfig.manifest?.data || []) |
| 58 | + ] |
| 59 | + }, |
| 60 | + |
| 61 | + // ============================================================================ |
| 62 | + // Development Server |
| 63 | + // ============================================================================ |
| 64 | + |
| 65 | + dev: { |
| 66 | + port: 3000, |
| 67 | + host: '0.0.0.0', |
| 68 | + watch: true, |
| 69 | + hotReload: true, |
| 70 | + }, |
| 71 | + |
| 72 | + // ============================================================================ |
| 73 | + // Deployment |
| 74 | + // ============================================================================ |
| 75 | + |
| 76 | + deploy: { |
| 77 | + target: 'static', // This is a static SPA |
| 78 | + region: 'us-east-1', |
| 79 | + }, |
| 80 | +}); |
0 commit comments