rtsa-client/quasar.config.js

222 lines
6.6 KiB
JavaScript
Raw Permalink Normal View History

2024-09-12 10:30:51 +08:00
/* 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
2024-09-12 15:11:20 +08:00
require('dotenv').config();
2024-09-12 10:30:51 +08:00
const { configure } = require('quasar/wrappers');
2024-09-12 15:11:20 +08:00
const BasePath = '';
2024-09-12 10:30:51 +08:00
module.exports = configure(function (/* ctx */) {
return {
2024-09-12 15:11:20 +08:00
eslint: {
// fix: true,
// include: [],
// exclude: [],
// rawOptions: {},
warnings: true,
errors: true,
exclude: ['src/protos/*'],
},
2024-09-12 10:30:51 +08:00
// https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
// preFetch: true,
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli-vite/boot-files
2024-09-12 15:11:20 +08:00
boot: ['axios', '@pixi/graphics-extras'],
2024-09-12 10:30:51 +08:00
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
2024-09-12 15:11:20 +08:00
css: ['app.scss'],
2024-09-12 10:30:51 +08:00
// https://github.com/quasarframework/quasar/tree/dev/extras
extras: [
// 'ionicons-v4',
// 'mdi-v7',
// '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
2024-09-12 15:11:20 +08:00
'material-symbols-outlined',
2024-09-12 10:30:51 +08:00
],
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
build: {
2024-09-12 15:11:20 +08:00
env: {
// test:测试服务器publish正式服务器其他本地
ENV_MODE: process.env.NODE_ENV,
URL_ENV: process.env.URL_ENV,
},
2024-09-12 10:30:51 +08:00
target: {
2024-09-12 15:11:20 +08:00
browser: ['es2020'],
node: 'node20',
2024-09-12 10:30:51 +08:00
},
2024-09-12 15:11:20 +08:00
vueRouterMode: 'history', // available values: 'hash', 'history'
vueRouterBase: BasePath,
2024-09-12 10:30:51 +08:00
// vueDevtools,
// vueOptionsAPI: false,
// rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
2024-09-12 15:11:20 +08:00
publicPath: BasePath,
2024-09-12 10:30:51 +08:00
// analyze: true,
// env: {},
// rawDefine: {}
// ignorePublicFolder: true,
2024-09-12 15:11:20 +08:00
minify: false,
2024-09-12 10:30:51 +08:00
// polyfillModulePreload: true,
// distDir
2024-09-12 15:11:20 +08:00
// distDir: `dist/${BasePath}`,
distDir: 'dist',
2024-09-12 10:30:51 +08:00
// extendViteConf (viteConf) {},
// viteVuePluginOptions: {},
2024-09-12 15:11:20 +08:00
alias: { 'protobufjs/light': 'protobufjs/dist/light/protobuf.min.js' },
// vitePlugins: [
// [ 'package-name', { ..options.. } ]
// ]
2024-09-12 10:30:51 +08:00
},
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
devServer: {
// https: true
2024-09-12 15:11:20 +08:00
open: true, // opens browser window automatically
base: BasePath,
2024-09-12 10:30:51 +08:00
},
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
framework: {
2024-09-12 15:11:20 +08:00
config: {
notify: {
position: 'top',
timeout: 2000,
progress: true,
},
},
2024-09-12 10:30:51 +08:00
// iconSet: 'material-icons', // Quasar icon set
// lang: 'en-US', // Quasar language pack
2024-09-12 15:11:20 +08:00
lang: 'zh-CN',
2024-09-12 10:30:51 +08:00
// 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: [],
2024-09-12 15:11:20 +08:00
autoImportComponentCase: 'combined',
2024-09-12 10:30:51 +08:00
// Quasar plugins
2024-09-12 15:11:20 +08:00
plugins: ['Notify', 'Dialog', 'Dark', 'AppFullscreen', 'Loading'],
2024-09-12 10:30:51 +08:00
},
// animations: 'all', // --- includes all animations
// https://v2.quasar.dev/options/animations
animations: [],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#sourcefiles
// sourceFiles: {
// rootComponent: 'src/App.vue',
// router: 'src/router/index',
// store: 'src/store/index',
// registerServiceWorker: 'src-pwa/register-service-worker',
// serviceWorker: '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-vite/developing-ssr/configuring-ssr
ssr: {
// ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
2024-09-12 15:11:20 +08:00
// will mess up SSR
2024-09-12 10:30:51 +08:00
// extendSSRWebserverConf (esbuildConf) {},
// extendPackageJson (json) {},
pwa: false,
// manualStoreHydration: true,
// manualPostHydrationTrigger: true,
prodPort: 3000, // The default port that the production server should use
2024-09-12 15:11:20 +08:00
// (gets superseded if process.env.PORT is specified at runtime)
2024-09-12 10:30:51 +08:00
middlewares: [
2024-09-12 15:11:20 +08:00
'render', // keep this as last one
],
2024-09-12 10:30:51 +08:00
},
// https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
pwa: {
workboxMode: 'generateSW', // or 'injectManifest'
injectPwaMetaTags: true,
swFilename: 'sw.js',
manifestFilename: 'manifest.json',
useCredentialsForManifestTag: false,
// useFilenameHashes: true,
// extendGenerateSWOptions (cfg) {}
// extendInjectManifestOptions (cfg) {},
// extendManifestJson (json) {}
// extendPWACustomSWConf (esbuildConf) {}
},
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/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-vite/developing-capacitor-apps/configuring-capacitor
capacitor: {
2024-09-12 15:11:20 +08:00
hideSplashscreen: true,
2024-09-12 10:30:51 +08:00
},
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/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
2024-09-12 15:11:20 +08:00
appId: 'rtss-simulation-app-client',
},
2024-09-12 10:30:51 +08:00
},
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
bex: {
2024-09-12 15:11:20 +08:00
contentScripts: ['my-content-script'],
2024-09-12 10:30:51 +08:00
// extendBexScriptsConf (esbuildConf) {}
// extendBexManifestJson (json) {}
2024-09-12 15:11:20 +08:00
},
};
2024-09-12 10:30:51 +08:00
});