From 02bacc6109cd8e91138112ad81a3a20df9c43675 Mon Sep 17 00:00:00 2001 From: FruitRiin Date: Sun, 19 Nov 2023 13:55:05 +0900 Subject: [PATCH] [wip]run standalone vite --- packages/frontend/src/index.html | 20 ++++++++++++++++++++ packages/frontend/vite.config.ts | 20 ++++++++++++++------ 2 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 packages/frontend/src/index.html diff --git a/packages/frontend/src/index.html b/packages/frontend/src/index.html new file mode 100644 index 0000000000..dd39d0fcbb --- /dev/null +++ b/packages/frontend/src/index.html @@ -0,0 +1,20 @@ + + + + + misskey + + + + + + +
+ + + + diff --git a/packages/frontend/vite.config.ts b/packages/frontend/vite.config.ts index da976b7917..f9103a4f06 100644 --- a/packages/frontend/vite.config.ts +++ b/packages/frontend/vite.config.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import path, {resolve} from 'path'; import pluginReplace from '@rollup/plugin-replace'; import pluginVue from '@vitejs/plugin-vue'; import { type UserConfig, defineConfig } from 'vite'; @@ -43,10 +43,21 @@ function toBase62(n: number): string { export function getConfig(): UserConfig { return { - base: '/vite/', - + root: "src", server: { port: 5173, + proxy: { + '/api': { + target: 'http://127.0.0.1:3000/', + }, + '/assets': { + target: 'http://127.0.0.1:3000/', + }, + '/twemoji': { + target: 'http://127.0.0.1:3000/', + }, + + } }, plugins: [ @@ -118,9 +129,6 @@ export function getConfig(): UserConfig { ], manifest: 'manifest.json', rollupOptions: { - input: { - app: './src/_boot_.ts', - }, output: { manualChunks: { vue: ['vue'],