Created
February 27, 2025 17:19
-
-
Save dontpaniclabsgists/64c1f670e96e3eab059889d642ef5c08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { defineConfig } from "vite"; | |
import vue from "@vitejs/plugin-vue"; | |
import { resolve } from "node:path"; | |
import dts from "vite-plugin-dts"; | |
// https://vitejs.dev/config/ | |
export default defineConfig({ | |
plugins: [vue(), dts({ tsconfigPath: './tsconfig.app.json' })], | |
build: { | |
lib: { | |
entry: resolve(__dirname, "src/index.ts"), | |
name: "NameOfYourLibrary", | |
fileName: "FileNameInDist", | |
}, | |
rollupOptions: { | |
external: ["vue"], | |
output: { | |
globals: { | |
vue: "Vue", | |
}, | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment