配置调整

This commit is contained in:
joylink_fanyuhong 2024-09-12 15:11:20 +08:00
parent f2bc8fd663
commit 22bb1c236b
4 changed files with 71 additions and 52 deletions

13
package-lock.json generated
View File

@ -23,6 +23,7 @@
"@typescript-eslint/eslint-plugin": "^7.16.0", "@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0", "@typescript-eslint/parser": "^7.16.0",
"autoprefixer": "^10.4.2", "autoprefixer": "^10.4.2",
"dotenv": "^16.4.5",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^8.1.0", "eslint-config-prettier": "^8.1.0",
"eslint-plugin-vue": "^9.0.0", "eslint-plugin-vue": "^9.0.0",
@ -2761,6 +2762,18 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/dotenv": {
"version": "16.4.5",
"resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-16.4.5.tgz",
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
"dev": true,
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/earcut": { "node_modules/earcut": {
"version": "2.2.4", "version": "2.2.4",
"resolved": "https://registry.npmmirror.com/earcut/-/earcut-2.2.4.tgz", "resolved": "https://registry.npmmirror.com/earcut/-/earcut-2.2.4.tgz",

View File

@ -34,7 +34,8 @@
"@types/node": "^12.20.21", "@types/node": "^12.20.21",
"@quasar/app-vite": "^1.9.0", "@quasar/app-vite": "^1.9.0",
"autoprefixer": "^10.4.2", "autoprefixer": "^10.4.2",
"typescript": "~5.5.4" "typescript": "~5.5.4",
"dotenv": "^16.4.5"
}, },
"engines": { "engines": {
"node": "^20 || ^18 || ^16", "node": "^20 || ^18 || ^16",

View File

@ -7,28 +7,33 @@
// Configuration for your app // Configuration for your app
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
require('dotenv').config();
const { configure } = require('quasar/wrappers'); const { configure } = require('quasar/wrappers');
const BasePath = '';
module.exports = configure(function (/* ctx */) { module.exports = configure(function (/* ctx */) {
return { return {
eslint: {
// fix: true,
// include: [],
// exclude: [],
// rawOptions: {},
warnings: true,
errors: true,
exclude: ['src/protos/*'],
},
// https://v2.quasar.dev/quasar-cli-vite/prefetch-feature // https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
// preFetch: true, // preFetch: true,
// app boot file (/src/boot) // app boot file (/src/boot)
// --> boot files are part of "main.js" // --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli-vite/boot-files // https://v2.quasar.dev/quasar-cli-vite/boot-files
boot: [ boot: ['axios', '@pixi/graphics-extras'],
],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: [ css: ['app.scss'],
'app.scss'
],
// https://github.com/quasarframework/quasar/tree/dev/extras // https://github.com/quasarframework/quasar/tree/dev/extras
extras: [ extras: [
@ -42,58 +47,67 @@ module.exports = configure(function (/* ctx */) {
'roboto-font', // optional, you are not bound to it 'roboto-font', // optional, you are not bound to it
'material-icons', // optional, you are not bound to it 'material-icons', // optional, you are not bound to it
'material-symbols-outlined',
], ],
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
build: { build: {
env: {
// test:测试服务器publish正式服务器其他本地
ENV_MODE: process.env.NODE_ENV,
URL_ENV: process.env.URL_ENV,
},
target: { target: {
browser: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ], browser: ['es2020'],
node: 'node20' node: 'node20',
}, },
vueRouterMode: 'hash', // available values: 'hash', 'history' vueRouterMode: 'history', // available values: 'hash', 'history'
// vueRouterBase, vueRouterBase: BasePath,
// vueDevtools, // vueDevtools,
// vueOptionsAPI: false, // vueOptionsAPI: false,
// rebuildCache: true, // rebuilds Vite/linter/etc cache on startup // rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
// publicPath: '/', publicPath: BasePath,
// analyze: true, // analyze: true,
// env: {}, // env: {},
// rawDefine: {} // rawDefine: {}
// ignorePublicFolder: true, // ignorePublicFolder: true,
// minify: false, minify: false,
// polyfillModulePreload: true, // polyfillModulePreload: true,
// distDir // distDir
// distDir: `dist/${BasePath}`,
distDir: 'dist',
// extendViteConf (viteConf) {}, // extendViteConf (viteConf) {},
// viteVuePluginOptions: {}, // viteVuePluginOptions: {},
alias: { 'protobufjs/light': 'protobufjs/dist/light/protobuf.min.js' },
vitePlugins: [ // vitePlugins: [
['vite-plugin-checker', { // [ 'package-name', { ..options.. } ]
vueTsc: { // ]
tsconfigPath: 'tsconfig.vue-tsc.json'
},
eslint: {
lintCommand: 'eslint "./**/*.{js,ts,mjs,cjs,vue}"'
}
}, { server: false }]
]
}, },
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
devServer: { devServer: {
// https: true // https: true
open: true // opens browser window automatically open: true, // opens browser window automatically
base: BasePath,
}, },
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
framework: { framework: {
config: {}, config: {
notify: {
position: 'top',
timeout: 2000,
progress: true,
},
},
// iconSet: 'material-icons', // Quasar icon set // iconSet: 'material-icons', // Quasar icon set
// lang: 'en-US', // Quasar language pack // lang: 'en-US', // Quasar language pack
lang: 'zh-CN',
// For special cases outside of where the auto-import strategy can have an impact // For special cases outside of where the auto-import strategy can have an impact
// (like functional components as one of the examples), // (like functional components as one of the examples),
@ -102,8 +116,10 @@ module.exports = configure(function (/* ctx */) {
// components: [], // components: [],
// directives: [], // directives: [],
autoImportComponentCase: 'combined',
// Quasar plugins // Quasar plugins
plugins: [] plugins: ['Notify', 'Dialog', 'Dark', 'AppFullscreen', 'Loading'],
}, },
// animations: 'all', // --- includes all animations // animations: 'all', // --- includes all animations
@ -139,8 +155,8 @@ module.exports = configure(function (/* ctx */) {
// (gets superseded if process.env.PORT is specified at runtime) // (gets superseded if process.env.PORT is specified at runtime)
middlewares: [ middlewares: [
'render' // keep this as last one 'render', // keep this as last one
] ],
}, },
// https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
@ -164,7 +180,7 @@ module.exports = configure(function (/* ctx */) {
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
capacitor: { capacitor: {
hideSplashscreen: true hideSplashscreen: true,
}, },
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
@ -178,13 +194,11 @@ module.exports = configure(function (/* ctx */) {
packager: { packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
// OS X / Mac App Store // OS X / Mac App Store
// appBundleId: '', // appBundleId: '',
// appCategoryType: '', // appCategoryType: '',
// osxSign: '', // osxSign: '',
// protocol: 'myapp://path', // protocol: 'myapp://path',
// Windows only // Windows only
// win32metadata: { ... } // win32metadata: { ... }
}, },
@ -192,18 +206,16 @@ module.exports = configure(function (/* ctx */) {
builder: { builder: {
// https://www.electron.build/configuration/configuration // https://www.electron.build/configuration/configuration
appId: 'rtss-simulation-app-client' appId: 'rtss-simulation-app-client',
} },
}, },
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
bex: { bex: {
contentScripts: [ contentScripts: ['my-content-script'],
'my-content-script'
],
// extendBexScriptsConf (esbuildConf) {} // extendBexScriptsConf (esbuildConf) {}
// extendBexManifestJson (json) {} // extendBexManifestJson (json) {}
} },
} };
}); });

View File

@ -5,12 +5,5 @@
"strict": false "strict": false
}, },
"include": ["src/**/*"], "include": ["src/**/*"],
"exclude": [ "exclude": ["/graphic-pixi/*/**.ts"]
"./dist",
"./.quasar",
"./node_modules",
"./src-capacitor",
"./src-cordova",
"./quasar.config.*.temporary.compiled*"
]
} }