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