25 lines
		
	
	
		
			492 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			25 lines
		
	
	
		
			492 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|  | import { defineConfig } from 'vite' | ||
|  | import vue from '@vitejs/plugin-vue' | ||
|  | import * as path from 'path'; | ||
|  | 
 | ||
|  | // https://vitejs.dev/config/
 | ||
|  | export default defineConfig({ | ||
|  |   build: { | ||
|  |     lib: { | ||
|  |       entry: path.resolve(__dirname, "src/index.js"), | ||
|  |       name: "vue3-kc", | ||
|  |       fileName: format => `${format}.js` | ||
|  |     }, | ||
|  |     rollupOptions: { | ||
|  |       external: ["vue"], | ||
|  |       output: { | ||
|  |         globals: { | ||
|  |           vue: "Vue", | ||
|  |         }, | ||
|  |         exports: 'named' | ||
|  |       } | ||
|  |     } | ||
|  |   }, | ||
|  |   plugins: [vue()], | ||
|  | }) |