Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"devDependencies": {
"@eslint/js": "^10",
"@quasar/app-vite": "^2.6.2",
"@quasar/app-vite": "^3.8.1",
"@types/node": "^26.2.0",
"@vue/eslint-config-prettier": "^10.2.0",
"@vue/eslint-config-typescript": "^14.9.0",
Expand Down
16 changes: 14 additions & 2 deletions quasar.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Configuration for your app
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file

import { defineConfig } from '#q-app/wrappers';
import { defineConfig } from '#q-app';

export default defineConfig((/* ctx */) => {
export default defineConfig((ctx) => {
return {
// https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
// preFetch: true,
Expand Down Expand Up @@ -32,6 +32,18 @@ export default defineConfig((/* ctx */) => {

// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#build
build: {
// @quasar/app-vite v3 ships only '@' -> /src and '#q-app'; it dropped the
// v2 folder aliases the codebase imports through ('app/…', 'src/…',
// 'boot/…', 'components/…', 'layouts/…', 'pages/…'). Re-declare them here.
alias: {
app: ctx.appPaths.appDir,
src: ctx.appPaths.srcDir,
boot: ctx.appPaths.resolve.src('boot'),
components: ctx.appPaths.resolve.src('components'),
layouts: ctx.appPaths.resolve.src('layouts'),
pages: ctx.appPaths.resolve.src('pages'),
},

target: {
browser: ['es2022', 'firefox115', 'chrome115', 'safari14'],
node: 'node22',
Expand Down
4 changes: 2 additions & 2 deletions src/boot/vuefire.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { boot } from 'quasar/wrappers';
import { defineBoot } from '#q-app';
import { initializeApp } from 'firebase/app';
import { getStorage } from 'firebase/storage';
import { useFirebaseApp, VueFire, VueFireAuth } from 'vuefire';
Expand All @@ -15,7 +15,7 @@ const firebaseApp = initializeApp(FIREBASE_CONFIG);

// "async" is optional;
// more info on params: https://v2.quasar.dev/quasar-cli/boot-files
export default boot(({ app }) => {
export default defineBoot(({ app }) => {
analytics = initializeAnalytics(firebaseApp);
app.use(VueFire, {
firebaseApp,
Expand Down
12 changes: 7 additions & 5 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { route } from 'quasar/wrappers';
import { defineRouter } from '#q-app';
import {
createMemoryHistory,
createRouter,
Expand All @@ -16,10 +16,12 @@ import routes from './routes';
* with the Router instance.
*/

export default route(function (/* { store, ssrContext } */) {
const createHistory = process.env.SERVER
export default defineRouter(function (/* { store, ssrContext } */) {
const createHistory = import.meta.env.QUASAR_SERVER
? createMemoryHistory
: (process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory);
: import.meta.env.QUASAR_VUE_ROUTER_MODE === 'history'
? createWebHistory
: createWebHashHistory;

const Router = createRouter({
scrollBehavior: () => ({ left: 0, top: 0 }),
Expand All @@ -28,7 +30,7 @@ export default route(function (/* { store, ssrContext } */) {
// Leave this as is and make changes in quasar.conf.js instead!
// quasar.conf.js -> build -> vueRouterMode
// quasar.conf.js -> build -> publicPath
history: createHistory(process.env.VUE_ROUTER_BASE),
history: createHistory(import.meta.env.QUASAR_VUE_ROUTER_BASE),
});

return Router;
Expand Down
Loading
Loading