Skip to content

Instantly share code, notes, and snippets.

@dontpaniclabsgists
Created February 27, 2025 17:19
Show Gist options
  • Save dontpaniclabsgists/64c1f670e96e3eab059889d642ef5c08 to your computer and use it in GitHub Desktop.
Save dontpaniclabsgists/64c1f670e96e3eab059889d642ef5c08 to your computer and use it in GitHub Desktop.
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