|
| 1 | +import { defineConfig } from '@adonisjs/core/app' |
| 2 | + |
| 3 | +export default defineConfig({ |
| 4 | + /* |
| 5 | + |-------------------------------------------------------------------------- |
| 6 | + | Experimental flags |
| 7 | + |-------------------------------------------------------------------------- |
| 8 | + | |
| 9 | + | The following features will be enabled by default in the next major release |
| 10 | + | of AdonisJS. You can opt into them today to avoid any breaking changes |
| 11 | + | during upgrade. |
| 12 | + | |
| 13 | + */ |
| 14 | + experimental: { |
| 15 | + mergeMultipartFieldsAndFiles: true, |
| 16 | + shutdownInReverseOrder: true, |
| 17 | + }, |
| 18 | + |
| 19 | + /* |
| 20 | + |-------------------------------------------------------------------------- |
| 21 | + | Commands |
| 22 | + |-------------------------------------------------------------------------- |
| 23 | + | |
| 24 | + | List of ace commands to register from packages. The application commands |
| 25 | + | will be scanned automatically from the "./commands" directory. |
| 26 | + | |
| 27 | + */ |
| 28 | + commands: [() => import('@adonisjs/core/commands'), () => import('@adonisjs/lucid/commands')], |
| 29 | + |
| 30 | + /* |
| 31 | + |-------------------------------------------------------------------------- |
| 32 | + | Service providers |
| 33 | + |-------------------------------------------------------------------------- |
| 34 | + | |
| 35 | + | List of service providers to import and register when booting the |
| 36 | + | application |
| 37 | + | |
| 38 | + */ |
| 39 | + providers: [ |
| 40 | + () => import('@adonisjs/core/providers/app_provider'), |
| 41 | + () => import('@adonisjs/core/providers/hash_provider'), |
| 42 | + { |
| 43 | + file: () => import('@adonisjs/core/providers/repl_provider'), |
| 44 | + environment: ['repl', 'test'], |
| 45 | + }, |
| 46 | + () => import('@adonisjs/core/providers/vinejs_provider'), |
| 47 | + () => import('@adonisjs/core/providers/edge_provider'), |
| 48 | + () => import('@adonisjs/session/session_provider'), |
| 49 | + () => import('@adonisjs/vite/vite_provider'), |
| 50 | + () => import('@adonisjs/shield/shield_provider'), |
| 51 | + () => import('@adonisjs/static/static_provider'), |
| 52 | + () => import('@adonisjs/cors/cors_provider'), |
| 53 | + () => import('@adonisjs/lucid/database_provider'), |
| 54 | + () => import('@adonisjs/inertia/inertia_provider'), |
| 55 | + () => import('@adonisjs/drive/drive_provider'), |
| 56 | + () => import('@adonisjs/transmit/transmit_provider') |
| 57 | + ], |
| 58 | + |
| 59 | + /* |
| 60 | + |-------------------------------------------------------------------------- |
| 61 | + | Preloads |
| 62 | + |-------------------------------------------------------------------------- |
| 63 | + | |
| 64 | + | List of modules to import before starting the application. |
| 65 | + | |
| 66 | + */ |
| 67 | + preloads: [() => import('#start/routes'), () => import('#start/kernel')], |
| 68 | + |
| 69 | + /* |
| 70 | + |-------------------------------------------------------------------------- |
| 71 | + | Tests |
| 72 | + |-------------------------------------------------------------------------- |
| 73 | + | |
| 74 | + | List of test suites to organize tests by their type. Feel free to remove |
| 75 | + | and add additional suites. |
| 76 | + | |
| 77 | + */ |
| 78 | + tests: { |
| 79 | + suites: [ |
| 80 | + { |
| 81 | + files: ['tests/unit/**/*.spec(.ts|.js)'], |
| 82 | + name: 'unit', |
| 83 | + timeout: 2000, |
| 84 | + }, |
| 85 | + { |
| 86 | + files: ['tests/functional/**/*.spec(.ts|.js)'], |
| 87 | + name: 'functional', |
| 88 | + timeout: 30000, |
| 89 | + }, |
| 90 | + ], |
| 91 | + forceExit: false, |
| 92 | + }, |
| 93 | + |
| 94 | + /* |
| 95 | + |-------------------------------------------------------------------------- |
| 96 | + | Metafiles |
| 97 | + |-------------------------------------------------------------------------- |
| 98 | + | |
| 99 | + | A collection of files you want to copy to the build folder when creating |
| 100 | + | the production build. |
| 101 | + | |
| 102 | + */ |
| 103 | + metaFiles: [ |
| 104 | + { |
| 105 | + pattern: 'resources/views/**/*.edge', |
| 106 | + reloadServer: false, |
| 107 | + }, |
| 108 | + { |
| 109 | + pattern: 'public/**', |
| 110 | + reloadServer: false, |
| 111 | + }, |
| 112 | + ], |
| 113 | + |
| 114 | + assetsBundler: false, |
| 115 | + hooks: { |
| 116 | + onBuildStarting: [() => import('@adonisjs/vite/build_hook')], |
| 117 | + }, |
| 118 | +}) |
0 commit comments