| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453 |
- /* eslint-env node */
- /*
- * This file runs in a Node context (it's NOT transpiled by Babel), so use only
- * the ES6 features that are supported by your Node version. https://node.green/
- */
- // Configuration for your app
- // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
- /* eslint-env node */
- // const ESLintPlugin = require('eslint-webpack-plugin')
- const { configure } = require('quasar/wrappers')
- // const path = require('path')
- const { generateWidgetList } = require('./src/widgetListGetter/index')
- require('dotenv').config()
- module.exports = configure(function (ctx) {
- return {
- // https://v2.quasar.dev/quasar-cli/supporting-ts
- // supportTS: false,
- eslint: {
- // fix: true,
- // include = [],
- // exclude = [],
- // rawOptions = {},
- warnings: true,
- errors: true
- },
- // https://v2.quasar.dev/quasar-cli/prefetch-feature
- preFetch: true,
- // app boot file (/src/boot)
- // --> boot files are part of "main.js"
- // https://v2.quasar.dev/quasar-cli/boot-files
- boot: [
- 'VuexPersistedState', // load store from localstorage to use in other boots (ex: accessToken in axios boot)
- // 'i18n',
- 'icon',
- 'axios',
- 'appConfig',
- 'middleware',
- 'bus',
- 'breadcrumbs',
- 'api-gateway',
- 'registerQPageBuilder',
- 'routesLayoutConfigs',
- 'GetRouteSettingFromServer',
- 'enums'
- // 'gtm'
- ],
- // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
- css: [
- 'app.scss'
- ],
- // https://github.com/quasarframework/quasar/tree/dev/extras
- extras: [
- // 'ionicons-v4',
- // 'mdi-v6',
- // 'mdi-v5',
- // 'fontawesome-v6',
- // 'ionicons-v4',
- // 'eva-icons',
- // 'themify',
- // 'line-awesome',
- // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
- // 'roboto-font', // optional, you are not bound to it
- 'material-icons', // optional, you are not bound to it
- 'material-icons-outlined' // optional, you are not bound to it
- ],
- // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
- build: {
- vueRouterMode: 'history', // available values: 'hash', 'history'
- productName: 'آموزش مجازی آلاء',
- transpile: true,
- // Add dependencies for transpiling with Babel (Array of string/regex)
- // (from node_modules, which are by default not transpiled).
- // Applies only if "transpile" is set to true.
- transpileDependencies: [
- 'js-abstract-model',
- 'quasar-template-builder',
- 'quasar-app-extension-q-page-builder',
- 'quasar-crud',
- 'quasar-form-builder',
- 'quasar-ui-q-page-builder'
- ],
- rtl: true, // https://v2.quasar.dev/options/rtl-support
- preloadChunks: true,
- showProgress: false,
- sourcemap: false,
- gzip: true,
- analyze: false,
- env: process.env,
- // https://v2.quasar.dev/quasar-cli/handling-webpack
- // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
- // chainWebpack (chain, { isServer, isClient }) {
- // // const hashh = '[id].[name].[chunkhash]'
- // // chain.output.filename('js/[name]/' + hashh + '.bundle.js')
- // // chain.output.chunkFilename('js/[name]/' + hashh + '.chunk.js')
- // // chain.plugin('eslint-webpack-plugin')
- // // .use(ESLintPlugin, [{ extensions: ['js', 'vue'] }])
- // // chain.module.rule('fonts')
- // // .use('url-loader')
- // // .tap((options) => {
- // // options.name = 'fonts/[path][name].[ext]'
- // // return options
- // // })
- //
- // // disable cache for prod only, remove the if to disable it everywhere
- // // if (process.env.NODE_ENV === 'production') {
- // chain.module.rule('vue').uses.delete('cache-loader')
- // chain.module.rule('js').uses.delete('cache-loader')
- // chain.module.rule('ts').uses.delete('cache-loader')
- // chain.module.rule('tsx').uses.delete('cache-loader')
- // // }
- //
- // // chain.plugin('friendly-errors').tap(args => {
- // // // the actual transformer defined by vue-cli-3
- // // const vueCli3Transformer = args[0].additionalTransformers[0]
- // // args[0].additionalTransformers = [
- // // // use the actual transformer
- // // vueCli3Transformer,
- // // // add an other transformer that 'empty' the desired error
- // // error => {
- // // const regexp = /\[mini-css-extract-plugin\]\nConflicting order between:/
- // // if (regexp.test(error.message)) return {}
- // // return error
- // // }
- // // ]
- // // return args
- // // })
- // },
- // extendWebpack (cfg, { isServer, isClient }) {
- // cfg.resolve.alias = {
- // ...cfg.resolve.alias, // This adds the existing alias
- //
- // root: path.resolve(__dirname, './src'),
- // // '@': path.resolve(__dirname,'./src'),
- // // '~': path.resolve(__dirname, './src'),
- //
- // // This will make sure that the hosting test app is pointing to only one instance of vue.
- // vue: path.resolve(__dirname, './node_modules/vue')
- // // vue: path.resolve('./node_modules/vue')
- // }
- //
- // cfg.watchOptions = {
- // aggregateTimeout: 200,
- // poll: 1000
- // }
- // cfg.optimization.splitChunks.minSize = 10000
- // cfg.optimization.splitChunks.maxSize = 250000
- //
- // // cfg.plugins.push(new CopyWebpackPlugin({
- // // patterns: [
- // // {
- // // // from: './src-pwa/firebase-messaging-sw.js',
- // // from: path.resolve('./src/ServiceWorker/firebase-messaging-sw.js'),
- // // to: path.resolve('./dist/pwa/firebase-messaging-sw.js')
- // // }
- // // ]
- // // }))
- // },
- beforeDev({ quasarConf }) {
- generateWidgetList('./src/components/Widgets')
- },
- beforeBuild({ quasarConf }) {
- generateWidgetList('./src/components/Widgets')
- },
- target: {
- browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
- node: 'node16'
- },
- minify: true,
- polyfillModulePreload: true,
- extendViteConf(viteConf) {
- // viteConf.resolve = {
- // alias: {
- // src: path.resolve(__dirname, './src'),
- // boot: path.resolve(__dirname, './src/boot'),
- // app: path.resolve(__dirname, './'),
- // layouts: path.resolve(__dirname, './src/layouts'),
- // pages: path.resolve(__dirname, './src/pages'),
- // assets: path.resolve(__dirname, './src/assets'),
- // mixin: path.resolve(__dirname, './src/mixin'),
- // components: path.resolve(__dirname, './src/components'),
- // models: path.resolve(__dirname, './src/models'),
- // plugins: path.resolve(__dirname, './src/plugins'),
- // router: path.resolve(__dirname, './src/router'),
- // css: path.resolve(__dirname, './src/css'),
- // api: path.resolve(__dirname, './src/api')
- // },
- // extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
- // dedupe: [
- // 'vue'
- // ]
- // }
- },
- vitePlugins: [
- // ['@intlify/vite-plugin-vue-i18n', {
- // // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
- // compositionOnly: false,
- //
- // // you need to set i18n resource including paths !
- // include: path.resolve(__dirname, './src/i18n/**')
- // }]
- // require('@originjs/vite-plugin-commonjs').esbuildCommonjs(['minio'])
- // [
- // require('@intlify/unplugin-vue-i18n').default,
- // {
- // // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
- // // compositionOnly: false,
- //
- // // you need to set i18n resource including paths !
- // include: path.resolve(__dirname, './src/i18n/**')
- // }
- // ]
- ]
- },
- // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
- devServer: {
- https: true,
- port: 8080,
- open: true, // opens browser window automatically
- proxy: {
- [process.env.APP_API]: {
- target: process.env.APP_API_SERVER,
- changeOrigin: true,
- secure: false,
- rewrite: (path) => path.replace(new RegExp('^' + process.env.APP_API), '') // vite
- }
- }
- },
- // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
- framework: {
- config: {
- notify: {
- timeout: 5000,
- position: 'top',
- // multiLine: true,
- classes: 'default-notify-class'
- },
- capacitor: {
- iosStatusBarPadding: true, // add the dynamic top padding on iOS mobile devices
- // Quasar handles app exit on mobile phone back button.
- // backButtonExit: true/false/'*'/['/login', '/home', '/my-page'],
- // On the other hand, the following completely
- // disables Quasar's back button management.
- backButton: true
- }
- },
- cssAddon: true,
- iconSet: 'material-icons', // Quasar icon set
- lang: 'fa', // Quasar language pack (en-US)
- // For special cases outside of where the auto-import strategy can have an impact
- // (like functional components as one of the examples),
- // you can manually specify Quasar components/directives to be available everywhere:
- //
- // components: [],
- directives: [
- 'ClosePopup'
- ],
- // Quasar plugins
- plugins: [
- 'Meta',
- 'Notify',
- 'Loading',
- 'Dialog',
- 'Cookies' // for cart
- ]
- },
- // animations: 'all', // --- includes all animations
- // https://v2.quasar.dev/options/animations
- animations: [],
- // animations: 'all',
- // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
- sourceFiles: {
- // rootComponent: 'src/App.vue',
- // router: 'src/router/index',
- // store: 'src/store/index',
- pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
- pwaServiceWorker: 'src-pwa/custom-service-worker',
- pwaManifestFile: 'src-pwa/manifest.json'
- // electronMain: 'src-electron/electron-main',
- // electronPreload: 'src-electron/electron-preload'
- },
- // https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
- ssr: {
- // ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
- // will mess up SSR
- // extendSSRWebserverConf (esbuildConf) {},
- // extendPackageJson (json) {},
- pwa: true,
- // manualStoreHydration: true,
- // manualPostHydrationTrigger: true,
- prodPort: process.env.SSR_PORT, // The default port that the production server should use
- // (gets superseded if process.env.PORT is specified at runtime)
- // maxAge: 1000 * 60 * 60 * 24 * 30,
- maxAge: 1,
- // Tell browser when a file from the server should expire from cache (in ms)
- // chainWebpackWebserver (chain) {
- // chain.plugin('eslint-webpack-plugin')
- // .use(ESLintPlugin, [{ extensions: ['js'] }])
- // // disable cache for prod only, remove the if to disable it everywhere
- // // if (process.env.NODE_ENV === 'production') {
- // chain.module.rule('vue').uses.delete('cache-loader')
- // chain.module.rule('js').uses.delete('cache-loader')
- // chain.module.rule('ts').uses.delete('cache-loader')
- // chain.module.rule('tsx').uses.delete('cache-loader')
- // // }
- // },
- middlewares: [
- ctx.prod ? 'compression' : '',
- 'render' // keep this as last one
- ]
- },
- // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
- pwa: {
- workboxMode: 'injectManifest', // 'generateSW' or 'injectManifest'
- injectPwaMetaTags: true,
- swFilename: 'sw.js',
- manifestFilename: 'manifest.json',
- useCredentialsForManifestTag: false,
- manifest: {
- name: 'پالیزوانی',
- short_name: 'پالیزوانی',
- start_url: '/',
- background_color: '#FFFFFF',
- theme_color: '#ffc107',
- description: 'پالیزوانی',
- display: 'standalone',
- orientation: 'portrait',
- icons: [
- {
- purpose: 'maskable',
- sizes: '512x512',
- src: 'icons/icon512_maskable.png',
- type: 'image/png'
- },
- {
- purpose: 'any',
- sizes: '512x512',
- src: 'icons/icon512_rounded.png',
- type: 'image/png'
- }
- ]
- },
- extendGenerateSWOptions (cfg) {
- cfg.skipWaiting = false
- cfg.clientsClaim = false
- }
- },
- // Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
- cordova: {
- // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
- },
- // Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
- capacitor: {
- // (Optional!)
- hideSplashscreen: false, // disables auto-hiding the Splashscreen by Quasar CLI
- // (Optional!)
- capacitorCliPreparationParams: ['sync', ctx.targetName]
- },
- bin: {
- linuxAndroidStudio: process.env.LINUX_ANDROID_STUDIO
- },
- // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
- electron: {
- // extendElectronMainConf (esbuildConf)
- // extendElectronPreloadConf (esbuildConf)
- inspectPort: 5858,
- bundler: 'packager', // 'packager' or 'builder'
- packager: {
- // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
- // OS X / Mac App Store
- // appBundleId: '',
- // appCategoryType: '',
- // osxSign: '',
- // protocol: 'myapp://path',
- // Windows only
- // win32metadata: { ... }
- },
- builder: {
- // https://www.electron.build/configuration/configuration
- appId: 'alaatv-front-vite'
- }
- // // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
- // chainWebpackMain (chain) {
- // chain.plugin('eslint-webpack-plugin')
- // .use(ESLintPlugin, [{ extensions: ['js'] }])
- // },
- // // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
- // chainWebpackPreload (chain) {
- // chain.plugin('eslint-webpack-plugin')
- // .use(ESLintPlugin, [{ extensions: ['js'] }])
- // }
- },
- // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
- bex: {
- contentScripts: [
- 'my-content-script'
- ]
- // extendBexScriptsConf (esbuildConf) {}
- // extendBexManifestJson (json) {}
- }
- }
- })
|