From 8c75946a0cf3b00b3c4c38d8631e8171ba4f3ecd Mon Sep 17 00:00:00 2001 From: CenTdemeern1 Date: Thu, 28 Nov 2024 17:57:34 +0100 Subject: [PATCH] Undo changes to the local dev config --- packages/frontend/vite.config.local-dev.ts | 30 +--------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/packages/frontend/vite.config.local-dev.ts b/packages/frontend/vite.config.local-dev.ts index 82cda7baf0..d588f83138 100644 --- a/packages/frontend/vite.config.local-dev.ts +++ b/packages/frontend/vite.config.local-dev.ts @@ -2,11 +2,10 @@ import dns from 'dns'; import { readFile } from 'node:fs/promises'; import type { IncomingMessage } from 'node:http'; import { defineConfig } from 'vite'; -import type { PluginOption, UserConfig } from 'vite'; +import type { UserConfig } from 'vite'; import * as yaml from 'js-yaml'; import locales from '../../locales/index.js'; import { getConfig } from './vite.config.js'; -import packageInfo from './package.json' with { type: 'json' }; dns.setDefaultResultOrder('ipv4first'); @@ -26,20 +25,6 @@ function varyHandler(req: IncomingMessage) { return '/index.html'; } -const externalPackages = [ - // sharkey: Used for SkFlashPlayer, has large wasm files so it's loaded via Ruffle's preferred CDN - { - name: 'ruffle', - match: /^@ruffle-rs\/ruffle\/?(?.*)$/, - path(id: string, pattern: RegExp): string { - const match = pattern.exec(id)?.groups; - return match - ? `https://esm.sh/@ruffle-rs/ruffle@${packageInfo.dependencies['@ruffle-rs/ruffle']}/${match['file']}?raw` - : id; - }, - }, -] - const devConfig: UserConfig = { // 基本の設定は vite.config.js から引き継ぐ ...defaultConfig, @@ -103,19 +88,6 @@ const devConfig: UserConfig = { ...defaultConfig.build, rollupOptions: { ...defaultConfig.build?.rollupOptions, - external: externalPackages.map(p => p.match), - output: { - ...defaultConfig.build?.rollupOptions?.output, - paths(id) { - for (const p of externalPackages) { - if (p.match.test(id)) { - return p.path(id, p.match); - } - } - - return id; - }, - }, input: 'index.html', }, },