chore: 開発モードでフロントエンドとバックエンドを独立して起動するようにする(再) (#12593)
* [wip]run standalone vite * [wip]run standalone vite * some fix (tabler icons, sw, streaming) * fix theme * fix run scripts * favicon * client-assets * cssの読み込み順序とCSP設定の変更 * fix lang change * fix clientManifest * baseを相対パスにしてドメイン直下とサブディレクトリ配下両方に対応 * 色々修正 * 色々修正 * 色々修正 * fix * Revert "client-assets" This reverts commit 582601e90eb771875bdf8aba263da2316a59d01b. # Conflicts: # packages/frontend/vite.config.ts * 色々修正 * fix * fix * add url and proxy to server proxy * Update packages/frontend/src/index.html * wip * Merge remote-tracking branch 'origin/develop' into feat/launch-standalone-frontend # Conflicts: # packages/frontend/src/pages/welcome.entrance.a.vue * Merge remote-tracking branch 'origin/develop' into feat/launch-standalone-frontend # Conflicts: # packages/frontend/src/pages/welcome.entrance.a.vue * fix tabler load * Apply suggestions from code review * Update packages/frontend/src/index.html * fix * fix vite.config.local-dev.ts * fix CONTRIBUTING.md --------- Co-authored-by: FruitRiin <nassii74@gmail.com> Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> Co-authored-by: 果物リン <fruitriin@riinswork.space> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> Co-authored-by: ozelot <contact@ozelot.dev>
This commit is contained in:
parent
e6d01e33e6
commit
b0039f0946
11 changed files with 153 additions and 3 deletions
53
packages/frontend/vite.config.local-dev.ts
Normal file
53
packages/frontend/vite.config.local-dev.ts
Normal file
|
@ -0,0 +1,53 @@
|
|||
import dns from 'dns';
|
||||
import { defineConfig } from 'vite';
|
||||
import { getConfig } from './vite.config.js';
|
||||
|
||||
dns.setDefaultResultOrder('ipv4first');
|
||||
|
||||
const defaultConfig = getConfig();
|
||||
|
||||
const devConfig = {
|
||||
// 基本の設定は vite.config.js から引き継ぐ
|
||||
...defaultConfig,
|
||||
root: 'src',
|
||||
publicDir: '../assets',
|
||||
base: './',
|
||||
server: {
|
||||
host: 'localhost',
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/api': {
|
||||
changeOrigin: true,
|
||||
target: 'http://localhost:3000/',
|
||||
},
|
||||
'/assets': 'http://localhost:3000/',
|
||||
'/files': 'http://localhost:3000/',
|
||||
'/twemoji': 'http://localhost:3000/',
|
||||
'/fluent-emoji': 'http://localhost:3000/',
|
||||
'/sw.js': 'http://localhost:3000/',
|
||||
'/streaming': {
|
||||
target: 'ws://localhost:3000/',
|
||||
ws: true,
|
||||
},
|
||||
'/favicon.ico': 'http://localhost:3000/',
|
||||
'/identicon': {
|
||||
target: 'http://localhost:3000/',
|
||||
rewrite(path) {
|
||||
return path.replace('@localhost:5173', '');
|
||||
},
|
||||
},
|
||||
'/url': 'http://localhost:3000',
|
||||
'/proxy': 'http://localhost:3000',
|
||||
},
|
||||
},
|
||||
build: {
|
||||
...defaultConfig.build,
|
||||
rollupOptions: {
|
||||
...defaultConfig.build?.rollupOptions,
|
||||
input: 'index.html',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default defineConfig(({ command, mode }) => devConfig);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue