🐛: 更新layer babel配置,修复regeneratorRuntime is not defined
This commit is contained in:
parent
aaa072db12
commit
d18425cb2a
@ -31,5 +31,8 @@
|
||||
"current node",
|
||||
"last 2 versions and > 2%",
|
||||
"ie > 10"
|
||||
]
|
||||
}
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-runtime": "^7.18.5"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { defineConfig } from "vite";
|
||||
import { name } from "./package.json";
|
||||
import babel from "@rollup/plugin-babel";
|
||||
import { babel } from "@rollup/plugin-babel";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import path from "path";
|
||||
|
||||
@ -31,11 +31,16 @@ export default defineConfig({
|
||||
assetFileNames: "index.css",
|
||||
},
|
||||
plugins: [
|
||||
// @ts-ignore
|
||||
babel({
|
||||
babelHelpers: 'runtime',
|
||||
exclude: "node_modules/**",
|
||||
extensions: [".js", ".jsx", ".ts", ".tsx", ".vue"],
|
||||
presets: ["@babel/preset-env", "@babel/preset-typescript"]
|
||||
presets: ["@babel/preset-env", "@babel/preset-typescript"],
|
||||
plugins: [
|
||||
[
|
||||
'@babel/plugin-transform-runtime',
|
||||
],
|
||||
]
|
||||
}),
|
||||
],
|
||||
external: ["vue"],
|
||||
|
Loading…
Reference in New Issue
Block a user