mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-18 08:21:34 +08:00
chore(types): refine monaco plugin default export typing
This commit is contained in:
parent
af9b1b777e
commit
4fa8b1f118
@ -2,9 +2,7 @@ import path from "node:path";
|
|||||||
|
|
||||||
import legacy from "@vitejs/plugin-legacy";
|
import legacy from "@vitejs/plugin-legacy";
|
||||||
import react from "@vitejs/plugin-react-swc";
|
import react from "@vitejs/plugin-react-swc";
|
||||||
import monacoEditorPlugin, {
|
import monacoEditorPlugin from "vite-plugin-monaco-editor-esm";
|
||||||
type IMonacoEditorOpts,
|
|
||||||
} from "vite-plugin-monaco-editor-esm";
|
|
||||||
import svgr from "vite-plugin-svgr";
|
import svgr from "vite-plugin-svgr";
|
||||||
import { defineConfig } from "vitest/config";
|
import { defineConfig } from "vitest/config";
|
||||||
|
|
||||||
@ -95,8 +93,12 @@ const chunkRules: ChunkRule[] = [
|
|||||||
!!pkg && LARGE_VENDOR_MATCHERS.some((keyword) => pkg.includes(keyword)),
|
!!pkg && LARGE_VENDOR_MATCHERS.some((keyword) => pkg.includes(keyword)),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const monacoEditorPluginDefault = ((monacoEditorPlugin as any).default ??
|
const monacoEditorPluginDefault: typeof monacoEditorPlugin =
|
||||||
monacoEditorPlugin) as (options: IMonacoEditorOpts) => any;
|
(
|
||||||
|
monacoEditorPlugin as typeof monacoEditorPlugin & {
|
||||||
|
default?: typeof monacoEditorPlugin;
|
||||||
|
}
|
||||||
|
).default ?? monacoEditorPlugin;
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
root: "src",
|
root: "src",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user