mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 05:23:44 +08:00
build: import babel
This commit is contained in:
parent
e69c0c079e
commit
ef7659691b
7
.babelrc
Normal file
7
.babelrc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
"@babel/preset-env",
|
||||||
|
"@babel/preset-react",
|
||||||
|
"@babel/preset-typescript"
|
||||||
|
]
|
||||||
|
}
|
10
package.json
10
package.json
@ -38,7 +38,6 @@
|
|||||||
"meta-json-schema": "1.18.5-alpha",
|
"meta-json-schema": "1.18.5-alpha",
|
||||||
"monaco-editor": "^0.47.0",
|
"monaco-editor": "^0.47.0",
|
||||||
"monaco-yaml": "^5.1.1",
|
"monaco-yaml": "^5.1.1",
|
||||||
"types-pac": "^1.0.2",
|
|
||||||
"nanoid": "^5.0.7",
|
"nanoid": "^5.0.7",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
@ -51,10 +50,15 @@
|
|||||||
"react-virtuoso": "^4.7.10",
|
"react-virtuoso": "^4.7.10",
|
||||||
"recoil": "^0.7.7",
|
"recoil": "^0.7.7",
|
||||||
"swr": "^1.3.0",
|
"swr": "^1.3.0",
|
||||||
"tar": "^6.2.1"
|
"tar": "^6.2.1",
|
||||||
|
"types-pac": "^1.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
|
"@babel/preset-env": "^7.24.6",
|
||||||
|
"@babel/preset-react": "^7.24.6",
|
||||||
|
"@babel/preset-typescript": "^7.24.6",
|
||||||
|
"@rollup/plugin-babel": "^6.0.4",
|
||||||
"@tauri-apps/cli": "^1.5.13",
|
"@tauri-apps/cli": "^1.5.13",
|
||||||
"@types/fs-extra": "^9.0.13",
|
"@types/fs-extra": "^9.0.13",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
@ -62,7 +66,7 @@
|
|||||||
"@types/react": "^18.3.1",
|
"@types/react": "^18.3.1",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
"@types/react-transition-group": "^4.4.10",
|
"@types/react-transition-group": "^4.4.10",
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
"@vitejs/plugin-react": "^4.3.0",
|
||||||
"adm-zip": "^0.5.12",
|
"adm-zip": "^0.5.12",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"fs-extra": "^11.2.0",
|
"fs-extra": "^11.2.0",
|
||||||
|
2751
pnpm-lock.yaml
generated
2751
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -2,15 +2,26 @@ import { defineConfig } from "vite";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import svgr from "vite-plugin-svgr";
|
import svgr from "vite-plugin-svgr";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
|
import { babel } from "@rollup/plugin-babel";
|
||||||
import monacoEditor from "vite-plugin-monaco-editor";
|
import monacoEditor from "vite-plugin-monaco-editor";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
root: "src",
|
root: "src",
|
||||||
server: { port: 3000 },
|
server: { port: 3000 },
|
||||||
plugins: [
|
plugins: [
|
||||||
svgr(),
|
svgr(),
|
||||||
react(),
|
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({
|
monacoEditor({
|
||||||
languageWorkers: ["editorWorkerService", "typescript", "css"],
|
languageWorkers: ["editorWorkerService", "typescript", "css"],
|
||||||
customWorkers: [
|
customWorkers: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user