-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathquasar.config.js
More file actions
198 lines (169 loc) · 5.82 KB
/
Copy pathquasar.config.js
File metadata and controls
198 lines (169 loc) · 5.82 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/* 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 { configure } = require('quasar/wrappers')
const path = require('path')
const vitePluginIstanbul = require('vite-plugin-istanbul')
require('dotenv').config({ path: path.resolve(__dirname, '.env') })
module.exports = configure(function (ctx) {
return {
eslint: {
warnings: true,
errors: true
},
// App boot file (/src/boot)
boot: ['tanstack-query', 'sentry', 'clarity'],
// CSS to include
css: ['app.css'],
// Extras to include (like fonts, icons)
extras: ['roboto-font', 'material-icons'],
// Build configuration
build: {
// Disable source maps for production
sourceMap: true,
target: {
// Use modern ECMAScript for browser support
browser: 'es2020',
// Ensure compatibility with Node.js 18
node: 'node18'
},
// Use 'history' mode for Vue Router
vueRouterMode: 'history',
extendViteConf(viteConf) {
viteConf.plugins = viteConf.plugins || []
viteConf.plugins.push(vitePluginIstanbul())
viteConf.build.rollupOptions = {
output: {
manualChunks(id) {
const chunks = ['@quasar/extras', 'echarts', 'firebase', 'pinia', 'quasar', 'vue', 'vue-echarts', 'vue-router']
if (id.includes('/node_modules/')) {
for (const chunkName of chunks) {
if (id.includes(chunkName)) {
return chunkName
}
}
}
}
}
}
viteConf.optimizeDeps = {
include: ['@web3modal/ethers5'],
esbuildOptions: {
// Ensure the target environment supports all features
target: 'es2020',
define: {
global: 'globalThis'
},
supported: {
bigint: true
}
}
}
}
},
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
devServer: {
// Disable automatic browser opening
open: false
},
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
framework: {
config: {
brand: {
primary: '#e54757',
secondary: '#5e6776',
accent: '#9C27B0',
dark: '#1d1d1d',
'dark-page': '#121212',
positive: '#21BA45',
negative: '#C10015',
info: '#31CCEC',
warning: '#F2C037'
},
notify: {
color: 'primary',
position: 'top',
progress: true,
timeout: 2500
}
},
// 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: ['BottomSheet', 'LocalStorage', 'Notify', 'Loading']
},
// animations: 'all', // --- includes all animations
// https://v2.quasar.dev/options/animations
animations: ['slideInDown', 'fadeIn', 'fadeOut'],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
sourceFiles: {
pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
pwaServiceWorker: 'src-pwa/custom-service-worker',
pwaManifestFile: 'src-pwa/manifest.json'
// rootComponent: 'src/App.vue',
// router: 'src/router/index',
// store: 'src/store/index',
// registerServiceWorker: 'src-pwa/register-service-worker',
// serviceWorker: 'src-pwa/custom-service-worker',
// 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: false,
// manualStoreHydration: true,
// manualPostHydrationTrigger: true,
// The default port that the production server should use
prodPort: 3000,
// (gets superseded if process.env.PORT is specified at runtime)
middlewares: [
// keep 'render' as last one
'render'
]
},
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
pwa: {
// or 'generateSW'
workboxMode: 'injectManifest',
injectPwaMetaTags: true,
swFilename: 'sw.js',
manifestFilename: 'manifest.json',
useCredentialsForManifestTag: false
},
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
capacitor: {
hideSplashscreen: true
},
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
electron: {
// extendElectronMainConf (esbuildConf)
// extendElectronPreloadConf (esbuildConf)
inspectPort: 5858,
// 'packager' or 'builder'
bundler: 'packager',
packager: {
appId: 'celebrity-fanalyzer'
}
},
// 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) {}
}
}
})