quasar.config.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. /* eslint-env node */
  2. // Configuration for your app
  3. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
  4. import { configure } from "quasar/wrappers";
  5. import { fileURLToPath } from "node:url";
  6. export default configure((ctx) => {
  7. return {
  8. // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
  9. // preFetch: true,
  10. // app boot file (/src/boot)
  11. // --> boot files are part of "main.js"
  12. // https://v2.quasar.dev/quasar-cli-vite/boot-files
  13. boot: ["i18n", "axios", "importGlobalComponents"],
  14. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
  15. css: ["app.scss"],
  16. // https://github.com/quasarframework/quasar/tree/dev/extras
  17. extras: [
  18. // 'ionicons-v4',
  19. "mdi-v7",
  20. // 'fontawesome-v6',
  21. // 'eva-icons',
  22. // 'themify',
  23. // 'line-awesome',
  24. // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
  25. "roboto-font", // optional, you are not bound to it
  26. "material-icons", // optional, you are not bound to it
  27. ],
  28. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
  29. build: {
  30. target: {
  31. browser: ["es2022", "firefox115", "chrome115", "safari14"],
  32. node: "node20",
  33. },
  34. vueRouterMode: "hash", // available values: 'hash', 'history'
  35. // vueRouterBase,
  36. // vueDevtools,
  37. // vueOptionsAPI: false,
  38. // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
  39. // publicPath: '/',
  40. // analyze: true,
  41. env: {
  42. API_URL: ctx.dev ? "http://localhost:8000" : "https://api.example.com",
  43. PASSWORD: ctx.dev ? "S@ft2080." : "",
  44. },
  45. // rawDefine: {}
  46. // ignorePublicFolder: true,
  47. // minify: false,
  48. // polyfillModulePreload: true,
  49. // distDir
  50. // extendViteConf (viteConf) {},
  51. // viteVuePluginOptions: {},
  52. vitePlugins: [
  53. [
  54. "@intlify/unplugin-vue-i18n/vite",
  55. {
  56. // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
  57. // compositionOnly: false,
  58. // if you want to use named tokens in your Vue I18n messages, such as 'Hello {name}',
  59. // you need to set `runtimeOnly: false`
  60. // runtimeOnly: false,
  61. ssr: ctx.modeName === "ssr",
  62. // you need to set i18n resource including paths !
  63. include: [fileURLToPath(new URL("./src/i18n", import.meta.url))],
  64. },
  65. ],
  66. [
  67. "vite-plugin-checker",
  68. {
  69. eslint: {
  70. lintCommand: 'eslint "./**/*.{js,mjs,cjs,vue}"',
  71. },
  72. },
  73. { server: false },
  74. ],
  75. ],
  76. },
  77. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
  78. devServer: {
  79. // https: true
  80. open: true, // opens browser window automatically
  81. },
  82. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
  83. framework: {
  84. config: {
  85. dark: "auto",
  86. notify: {
  87. position: "top-right",
  88. },
  89. },
  90. // iconSet: 'material-icons', // Quasar icon set
  91. // lang: 'en-US', // Quasar language pack
  92. // For special cases outside of where the auto-import strategy can have an impact
  93. // (like functional components as one of the examples),
  94. // you can manually specify Quasar components/directives to be available everywhere:
  95. //
  96. // components: [],
  97. // directives: [],
  98. // Quasar plugins
  99. plugins: ["Dialog", "Notify", "Loading", "Cookies", "Dark"],
  100. },
  101. // animations: 'all', // --- includes all animations
  102. // https://v2.quasar.dev/options/animations
  103. animations: [],
  104. // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
  105. // sourceFiles: {
  106. // rootComponent: 'src/App.vue',
  107. // router: 'src/router/index',
  108. // store: 'src/store/index',
  109. // pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
  110. // pwaServiceWorker: 'src-pwa/custom-service-worker',
  111. // pwaManifestFile: 'src-pwa/manifest.json',
  112. // electronMain: 'src-electron/electron-main',
  113. // electronPreload: 'src-electron/electron-preload'
  114. // bexManifestFile: 'src-bex/manifest.json
  115. // },
  116. // https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
  117. ssr: {
  118. prodPort: 3000, // The default port that the production server should use
  119. // (gets superseded if process.env.PORT is specified at runtime)
  120. middlewares: [
  121. "render", // keep this as last one
  122. ],
  123. // extendPackageJson (json) {},
  124. // extendSSRWebserverConf (esbuildConf) {},
  125. // manualStoreSerialization: true,
  126. // manualStoreSsrContextInjection: true,
  127. // manualStoreHydration: true,
  128. // manualPostHydrationTrigger: true,
  129. pwa: false,
  130. // pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
  131. // will mess up SSR
  132. // pwaExtendGenerateSWOptions (cfg) {},
  133. // pwaExtendInjectManifestOptions (cfg) {}
  134. },
  135. // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
  136. pwa: {
  137. workboxMode: "GenerateSW", // 'GenerateSW' or 'InjectManifest'
  138. // swFilename: 'sw.js',
  139. // manifestFilename: 'manifest.json'
  140. // extendManifestJson (json) {},
  141. // useCredentialsForManifestTag: true,
  142. // injectPwaMetaTags: false,
  143. // extendPWACustomSWConf (esbuildConf) {},
  144. // extendGenerateSWOptions (cfg) {},
  145. // extendInjectManifestOptions (cfg) {}
  146. },
  147. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
  148. cordova: {
  149. // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
  150. },
  151. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
  152. capacitor: {
  153. hideSplashscreen: true,
  154. },
  155. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
  156. electron: {
  157. // extendElectronMainConf (esbuildConf) {},
  158. // extendElectronPreloadConf (esbuildConf) {},
  159. // extendPackageJson (json) {},
  160. // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
  161. preloadScripts: ["electron-preload"],
  162. // specify the debugging port to use for the Electron app when running in development mode
  163. inspectPort: 5858,
  164. bundler: "packager", // 'packager' or 'builder'
  165. packager: {
  166. // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
  167. // OS X / Mac App Store
  168. // appBundleId: '',
  169. // appCategoryType: '',
  170. // osxSign: '',
  171. // protocol: 'myapp://path',
  172. // Windows only
  173. // win32metadata: { ... }
  174. },
  175. builder: {
  176. // https://www.electron.build/configuration/configuration
  177. appId: "quasar-skeleton",
  178. },
  179. },
  180. // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
  181. bex: {
  182. // extendBexScriptsConf (esbuildConf) {},
  183. // extendBexManifestJson (json) {},
  184. contentScripts: ["my-content-script"],
  185. },
  186. };
  187. });