|
@@ -0,0 +1,25 @@
|
|
|
+import { defineConfig } from 'vite';
|
|
|
+import vue from '@vitejs/plugin-vue';
|
|
|
+import VitePluginStyleInject from 'vite-plugin-style-inject';
|
|
|
+
|
|
|
+export default defineConfig({
|
|
|
+ plugins: [
|
|
|
+ vue(),
|
|
|
+ VitePluginStyleInject()
|
|
|
+ ],
|
|
|
+ build: {
|
|
|
+ lib: {
|
|
|
+ entry: 'index.js',
|
|
|
+ name: 'MyComponentLibrary',
|
|
|
+ fileName: (format) => `index.${format}.js`,
|
|
|
+ },
|
|
|
+ rollupOptions: {
|
|
|
+ external: ['vue'],
|
|
|
+ output: {
|
|
|
+ globals: {
|
|
|
+ vue: 'Vue'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+});
|