Repository navigation
Expand file tree
/
Copy pathquasar.config.js
More file actions
144 lines (130 loc) · 4.4 KB
/
Copy pathquasar.config.js
File metadata and controls
144 lines (130 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/* 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
const defineEnv = require('./env/envparser')()
const { configure } = require('quasar/wrappers')
const path = require('path')
// const fs = require('fs')
module.exports = configure(function (ctx) {
return {
eslint: {
// include: [],
// exclude: [],
warnings: true,
errors: true
},
// https://v2.quasar.dev/quasar-cli/prefetch-feature
preFetch: true,
// app boot file (/src/boot) (this is your main.js)
// --> boot files are generated into a "main.js" file
// https://v2.quasar.dev/quasar-cli/boot-files
boot: [
'axios',
'htmlToPaper',
'vueJsonExcel'
],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: ['app.scss'],
// https://github.com/quasarframework/quasar/tree/dev/extras
// setup icons packs, external fonts and other external plugins here
extras: [
// 'ionicons-v4',
// 'mdi-v5',
// 'fontawesome-v6',
// '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
'mdi-v7'
],
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
devServer: {
open: true, // opens browser window automatically
port: ctx.mode.spa ? 3000 : 8000,
https: ctx.mode.spa ? false : true
// https: ctx.mode.spa ? false : {
// key: fs.readFileSync('./.cert/key.pem'),
// cert: fs.readFileSync('./.cert/cert.pem')
// }
},
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
framework: {
config: {},
cssAddon: true,
iconSet: 'material-icons', // Quasar icon set
lang: 'en-US', // Quasar language pack
// 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: [],
// Quasar plugins
plugins: [
'LocalStorage',
'SessionStorage',
'Notify'
]
},
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
build: {
target: {
browser: [
'es2019',
'edge88',
'firefox78',
'chrome87',
'safari13.1'
],
node: 'node16'
},
alias: {
'@': path.resolve(__dirname, './src')
},
vueRouterMode: 'history', // available values: 'hash', 'history'
vueOptionsAPI: true,
publicPath: process.env.VITE_BASE_URL,
env: defineEnv
// vueDevtools,
// rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
// analyze: true,
// rawDefine: {}
// ignorePublicFolder: true,
// minify: false,
// polyfillModulePreload: true,
// distDir
// extendViteConf (viteConf) {},
// viteVuePluginOptions: {},
// vitePlugins: [
// [ 'package-name', { ..options.. } ]
// ]
},
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
pwa: {
workboxMode: 'injectManifest', // or 'generateSW'
injectPwaMetaTags: true,
swFilename: 'sw.js',
manifestFilename: 'manifest.json',
useCredentialsForManifestTag: false,
useFilenameHashes: false,
extendManifestJson (json) {
// tamper with the json inline
json.name = process.env.VITE_ENV == 'production' ? json.name : `${json.name}-${process.env.VITE_ENV}`,
json.short_name = process.env.VITE_ENV == 'production' ? json.short_name : `${json.short_name}-${process.env.VITE_ENV}`
}
// extendInjectManifestOptions (cfg) {},
// extendPWACustomSWConf (esbuildConf) {}
},
sourceFiles: {
pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
pwaServiceWorker: 'src-pwa/custom-service-worker', // only used if workboxMode is injectManifest
pwaManifestFile: 'src-pwa/manifest.json'
}
}
})