diff --git a/package/layer/vite.config.ts b/package/layer/vite.config.ts index c7a9e0b1..5e18ac32 100644 --- a/package/layer/vite.config.ts +++ b/package/layer/vite.config.ts @@ -1,5 +1,6 @@ import { defineConfig } from "vite"; import { name } from "./package.json"; +import babel from "@rollup/plugin-babel"; import vue from "@vitejs/plugin-vue"; import path from "path"; @@ -29,6 +30,14 @@ export default defineConfig({ }, assetFileNames: "index.css", }, + plugins: [ + // @ts-ignore + babel({ + exclude: "node_modules/**", + extensions: [".js", ".jsx", ".ts", ".tsx", ".vue"], + presets: ["@babel/preset-env", "@babel/preset-typescript"] + }), + ], external: ["vue"], }, },