quasar.conf.js 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. /*
  2. * This file runs in a Node context (it's NOT transpiled by Babel), so use only
  3. * the ES6 features that are supported by your Node version. https://node.green/
  4. */
  5. // Configuration for your app
  6. // https://v2.quasar.dev/quasar-cli/quasar-conf-js
  7. /* eslint-env node */
  8. /* eslint-disable @typescript-eslint/no-var-requires */
  9. const { configure } = require('quasar/wrappers');
  10. module.exports = configure(function (ctx) {
  11. return {
  12. // https://v2.quasar.dev/quasar-cli/supporting-ts
  13. supportTS: {
  14. tsCheckerConfig: {
  15. eslint: {
  16. enabled: true,
  17. files: './src/**/*.{ts,tsx,js,jsx,vue}',
  18. },
  19. },
  20. },
  21. // https://v2.quasar.dev/quasar-cli/prefetch-feature
  22. // preFetch: true,
  23. // app boot file (/src/boot)
  24. // --> boot files are part of "main.js"
  25. // https://v2.quasar.dev/quasar-cli/boot-files
  26. boot: [],
  27. // https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
  28. css: ['app.scss'],
  29. // https://github.com/quasarframework/quasar/tree/dev/extras
  30. extras: [
  31. // 'ionicons-v4',
  32. // 'mdi-v5',
  33. // 'fontawesome-v5',
  34. // 'eva-icons',
  35. // 'themify',
  36. // 'line-awesome',
  37. // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
  38. 'roboto-font', // optional, you are not bound to it
  39. 'material-icons', // optional, you are not bound to it
  40. 'material-icons-outlined', // optional, you are not bound to it
  41. ],
  42. // Full list of options: https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
  43. build: {
  44. // publicPath: '/',
  45. publicPath:
  46. process.env.NODE_ENV === 'development'
  47. ? '/'
  48. : '/themes/custom/physics/mie/', // deploy path in Drupal setup at physics.ifmo.ru
  49. // : '/themes/custom/physics/mie-next/', // deploy path in Drupal setup at physics.ifmo.ru
  50. env: {
  51. // copy publicPath from above build.publicPath to make it available from inside of the app.
  52. // publicPath: '/',
  53. publicPath: ctx.dev ? '/' : '/themes/custom/physics/mie/', // deploy path in Drupal setup at physics.ifmo.ru
  54. // publicPath: ctx.dev ? '/' : '/themes/custom/physics/mie-next/', // deploy path in Drupal setup at physics.ifmo.ru
  55. },
  56. // extendWebpack (cfg, { isServer, isClient }) {
  57. // cfg.module.rules.push({
  58. // enforce: 'pre',
  59. // test: /\.wasm$/,
  60. // loader: 'wasm-loader'
  61. // })
  62. // },
  63. vueRouterMode: 'hash', // available values: 'hash', 'history'
  64. // vueRouterMode: 'history', // available values: 'hash', 'history'
  65. // transpile: false,
  66. // Add dependencies for transpiling with Babel (Array of string/regex)
  67. // (from node_modules, which are by default not transpiled).
  68. // Applies only if "transpile" is set to true.
  69. // transpileDependencies: [],
  70. // rtl: true, // https://v2.quasar.dev/options/rtl-support
  71. // preloadChunks: true,
  72. // showProgress: false,
  73. // gzip: true,
  74. // analyze: true,
  75. // Options below are automatically set depending on the env, set them if you want to override
  76. // extractCSS: false,
  77. // https://v2.quasar.dev/quasar-cli/handling-webpack
  78. // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
  79. chainWebpack(chain) {
  80. const nodePolyfillWebpackPlugin = require('node-polyfill-webpack-plugin');
  81. chain.plugin('node-polyfill').use(nodePolyfillWebpackPlugin);
  82. },
  83. },
  84. // Full list of options: https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-devServer
  85. devServer: {
  86. https: false,
  87. port: 8080,
  88. open: true, // opens browser window automatically
  89. },
  90. // https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework
  91. framework: {
  92. cssAddon: true,
  93. // iconSet: 'material-icons', // Quasar icon set
  94. // lang: 'en-US', // Quasar language pack
  95. // For special cases outside of where the auto-import strategy can have an impact
  96. // (like functional components as one of the examples),
  97. // you can manually specify Quasar components/directives to be available everywhere:
  98. //
  99. // components: [],
  100. // directives: [],
  101. // Quasar plugins
  102. plugins: ['Loading', 'Notify'],
  103. config: {
  104. loading: {
  105. /* look at QuasarConfOptions from the API card */
  106. },
  107. },
  108. },
  109. // animations: 'all', // --- includes all animations
  110. // https://v2.quasar.dev/options/animations
  111. animations: [],
  112. // https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
  113. ssr: {
  114. pwa: false,
  115. // manualStoreHydration: true,
  116. // manualPostHydrationTrigger: true,
  117. prodPort: 3000, // The default port that the production server should use
  118. // (gets superseded if process.env.PORT is specified at runtime)
  119. maxAge: 1000 * 60 * 60 * 24 * 30,
  120. // Tell browser when a file from the server should expire from cache (in ms)
  121. chainWebpackWebserver(/* chain */) {
  122. //
  123. },
  124. middlewares: [
  125. ctx.prod ? 'compression' : '',
  126. 'render', // keep this as last one
  127. ],
  128. },
  129. // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
  130. pwa: {
  131. workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
  132. workboxOptions: {}, // only for GenerateSW
  133. // for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts])
  134. // if using workbox in InjectManifest mode
  135. chainWebpackCustomSW(/* chain */) {
  136. //
  137. },
  138. manifest: {
  139. name: `Scattnlay`,
  140. short_name: `Scattnlay`,
  141. description: `Mie scattering simulations`,
  142. display: 'standalone',
  143. orientation: 'portrait',
  144. background_color: '#ffffff',
  145. theme_color: '#027be3',
  146. icons: [
  147. {
  148. src: 'icons/icon-128x128.png',
  149. sizes: '128x128',
  150. type: 'image/png',
  151. },
  152. {
  153. src: 'icons/icon-192x192.png',
  154. sizes: '192x192',
  155. type: 'image/png',
  156. },
  157. {
  158. src: 'icons/icon-256x256.png',
  159. sizes: '256x256',
  160. type: 'image/png',
  161. },
  162. {
  163. src: 'icons/icon-384x384.png',
  164. sizes: '384x384',
  165. type: 'image/png',
  166. },
  167. {
  168. src: 'icons/icon-512x512.png',
  169. sizes: '512x512',
  170. type: 'image/png',
  171. },
  172. ],
  173. },
  174. },
  175. // Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
  176. cordova: {
  177. // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
  178. },
  179. // Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
  180. capacitor: {
  181. hideSplashscreen: true,
  182. },
  183. // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
  184. electron: {
  185. bundler: 'packager', // 'packager' or 'builder'
  186. packager: {
  187. // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
  188. // OS X / Mac App Store
  189. // appBundleId: '',
  190. // appCategoryType: '',
  191. // osxSign: '',
  192. // protocol: 'myapp://path',
  193. // Windows only
  194. // win32metadata: { ... }
  195. },
  196. builder: {
  197. // https://www.electron.build/configuration/configuration
  198. appId: 'guiapp',
  199. },
  200. // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
  201. chainWebpack(/* chain */) {
  202. // do something with the Electron main process Webpack cfg
  203. // extendWebpackMain also available besides this chainWebpackMain
  204. },
  205. // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
  206. chainWebpackPreload(/* chain */) {
  207. // do something with the Electron main process Webpack cfg
  208. // extendWebpackPreload also available besides this chainWebpackPreload
  209. },
  210. },
  211. };
  212. });