From 9b387c3eafd5c86c4c52d978073e6cb5d59c1bbe Mon Sep 17 00:00:00 2001 From: Logan Williams Date: Tue, 1 Aug 2023 10:20:12 +0200 Subject: [PATCH] Use history mode for routing --- .gitignore | 67 ++++++++++++++++++++++++++++++++++++ frontend/firebase.json | 16 +++++++++ frontend/src/router/index.js | 4 +++ 3 files changed, 87 insertions(+) create mode 100644 frontend/firebase.json diff --git a/.gitignore b/.gitignore index 2340990..fd3b8b4 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,71 @@ pnpm-debug.log* *.sw? firebaseConfig.js +.firebaserc +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +firebase-debug.log* +firebase-debug.*.log* + +# Firebase cache +.firebase/ + +# Firebase config + +# Uncomment this if you'd like others to create their own Firebase project. +# For a team working on the same Firebase project(s), it is recommended to leave +# it commented so all members can deploy to the same project(s) in .firebaserc. +# .firebaserc + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env diff --git a/frontend/firebase.json b/frontend/firebase.json new file mode 100644 index 0000000..2c33c29 --- /dev/null +++ b/frontend/firebase.json @@ -0,0 +1,16 @@ +{ + "hosting": { + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +} diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index be157f0..282f090 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -25,7 +25,11 @@ const routes = [ ]; const router = new VueRouter({ + mode: "history", routes, + scrollBehavior() { + return { x: 0, y: 0 }; + }, }); export default router;