revert(dev): フロントエンド・バックエンドを分離する開発モードを廃止

(cherry picked from commit 35104d87d5174a080143d3604e50bbef974ab04e)

Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
あわわわとーにゅ 2025-01-26 06:47:36 +09:00
parent eda6d6f455
commit d18599458c
No known key found for this signature in database
GPG key ID: 6AFBBF529601C1DB
9 changed files with 14 additions and 240 deletions

View file

@ -3,6 +3,8 @@ import pluginReplace from '@rollup/plugin-replace';
import pluginVue from '@vitejs/plugin-vue';
import typescript from '@rollup/plugin-typescript';
import { type UserConfig, defineConfig } from 'vite';
import * as yaml from 'js-yaml';
import { promises as fsp } from 'fs';
import locales from '../../locales/index.js';
import meta from '../../package.json';
@ -10,6 +12,9 @@ import packageInfo from './package.json' with { type: 'json' };
import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-module-class-name.js';
import pluginJson5 from './vite.json5.js';
const url = process.env.NODE_ENV === 'development' ? yaml.load(await fsp.readFile('../../.config/default.yml', 'utf-8')).url : null;
const host = url ? (new URL(url)).hostname : undefined;
const extensions = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.json', '.json5', '.svg', '.sass', '.scss', '.css', '.vue'];
/**
@ -65,6 +70,7 @@ export function getConfig(): UserConfig {
base: '/vite/',
server: {
host,
port: 5173,
},