restore support for local dev using a non-local url
This commit is contained in:
@@ -3,8 +3,6 @@ import pluginReplace from '@rollup/plugin-replace';
|
||||
import pluginVue from '@vitejs/plugin-vue';
|
||||
import { type UserConfig, defineConfig } from 'vite';
|
||||
import { localesVersion } from '../../locales/version.js';
|
||||
import * as yaml from 'js-yaml';
|
||||
import { promises as fsp } from 'fs';
|
||||
|
||||
import locales from '../../locales/index.js';
|
||||
import meta from '../../package.json';
|
||||
@@ -13,9 +11,6 @@ import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-modul
|
||||
import pluginJson5 from './vite.json5.js';
|
||||
import { pluginReplaceIcons } from './vite.replaceIcons.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', '.wasm'];
|
||||
|
||||
/**
|
||||
@@ -82,7 +77,6 @@ export function getConfig(): UserConfig {
|
||||
base: '/vite/',
|
||||
|
||||
server: {
|
||||
host,
|
||||
port: 5173,
|
||||
hmr: {
|
||||
// バックエンド経由での起動時、Viteは5173経由でアセットを参照していると思い込んでいるが実際は3000から配信される
|
||||
|
||||
Reference in New Issue
Block a user