mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-19 19:15:41 +08:00
build: import babel
This commit is contained in:
1 parent
e69c0c079e
commit
ef7659691b
4 files changed
+2236
-545
No files matched your search
+12
-1
@@ -2,15 +2,26 @@ import { defineConfig } from "vite";
|
||||
import path from "path";
|
||||
import svgr from "vite-plugin-svgr";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { babel } from "@rollup/plugin-babel";
|
||||
import monacoEditor from "vite-plugin-monaco-editor";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
root: "src",
|
||||
server: { port: 3000 },
|
||||
plugins: [
|
||||
svgr(),
|
||||
react(),
|
||||
{
|
||||
apply: "build", // apply only for build, not for serve
|
||||
...babel({
|
||||
babelHelpers: "bundled",
|
||||
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
||||
targets: {
|
||||
edge: "109", // last version to support Windows 7
|
||||
safari: "13", // macOS 10.15 Catalina
|
||||
},
|
||||
}),
|
||||
},
|
||||
monacoEditor({
|
||||
languageWorkers: ["editorWorkerService", "typescript", "css"],
|
||||
customWorkers: [
|
||||
|
||||
Reference in new issue
Block a user