37 lines
724 B
TypeScript
37 lines
724 B
TypeScript
|
|
|
|
|
|
import { defineConfig } from "vite"
|
|
import vue from "@vitejs/plugin-vue"
|
|
import vuetify from "vite-plugin-vuetify"
|
|
import path from "node:path"
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
vuetify({ autoImport: true }),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: path.resolve(__dirname, "src/index.ts"),
|
|
name: "eli_vue",
|
|
fileName: (format) => `eli-vue.${format}.js`,
|
|
},
|
|
rollupOptions: {
|
|
// não bundle o Vue
|
|
external: ["vue", /^vuetify(\/.*)?$/],
|
|
output: {
|
|
globals: {
|
|
vue: "Vue",
|
|
vuetify: "Vuetify",
|
|
},
|
|
exports: "named",
|
|
},
|
|
},
|
|
},
|
|
})
|