mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
More work on bundling vite for production
This commit is contained in:
parent
c8ffca37b1
commit
d62e81977e
7 changed files with 48 additions and 18 deletions
|
|
@ -2,19 +2,12 @@ import { createApp } from "vue";
|
|||
import "./style.css";
|
||||
import "virtual:uno.css";
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
import Login from "./login.vue";
|
||||
import App from "./App.vue";
|
||||
|
||||
const Home = { template: "<div>Home</div>" };
|
||||
|
||||
const routes = [
|
||||
{ path: "/", component: Home },
|
||||
{ path: "/oauth/authorize", component: Login },
|
||||
];
|
||||
import routes from "./routes";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
routes: routes,
|
||||
});
|
||||
|
||||
const app = createApp(App);
|
||||
|
|
|
|||
8
pages/routes.ts
Normal file
8
pages/routes.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import Login from "./login.vue";
|
||||
|
||||
const Home = { template: "<div>Home</div>" };
|
||||
|
||||
export default [
|
||||
{ path: "/", component: Home },
|
||||
{ path: "/oauth/authorize", component: Login },
|
||||
];
|
||||
|
|
@ -5,7 +5,7 @@ import vue from "@vitejs/plugin-vue";
|
|||
export default defineConfig({
|
||||
base: "/",
|
||||
build: {
|
||||
outDir: "../vite-dist",
|
||||
outDir: "./dist",
|
||||
},
|
||||
// main.ts is in pages/ directory
|
||||
resolve: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue