mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 01:33:45 +08:00
fix: the CJS build of Vite's Node API is deprecated, part 2
This commit is contained in:
parent
e8b3bd5bdc
commit
824325a2eb
@ -99,5 +99,6 @@
|
||||
"singleQuote": false,
|
||||
"endOfLine": "lf"
|
||||
},
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@9.1.4"
|
||||
}
|
||||
|
@ -3,7 +3,12 @@ import path from "path";
|
||||
import svgr from "vite-plugin-svgr";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import legacy from "@vitejs/plugin-legacy";
|
||||
import monacoEditor from "vite-plugin-monaco-editor";
|
||||
import monacoEditorPlugin, {
|
||||
type IMonacoEditorOpts,
|
||||
} from "vite-plugin-monaco-editor";
|
||||
const monacoEditorPluginDefault = (monacoEditorPlugin as any).default as (
|
||||
options: IMonacoEditorOpts
|
||||
) => any;
|
||||
|
||||
export default defineConfig({
|
||||
root: "src",
|
||||
@ -23,7 +28,7 @@ export default defineConfig({
|
||||
path.resolve("./src/polyfills/RegExp.js"),
|
||||
],
|
||||
}),
|
||||
monacoEditor({
|
||||
monacoEditorPluginDefault({
|
||||
languageWorkers: ["editorWorkerService", "typescript", "css"],
|
||||
customWorkers: [
|
||||
{
|
Loading…
x
Reference in New Issue
Block a user