build umd components

This commit is contained in:
dni ⚡
2025-12-23 10:58:53 +01:00
parent d7723696d8
commit 3be06269c2
7 changed files with 56 additions and 26 deletions
+26
View File
@@ -0,0 +1,26 @@
import {defineConfig} from 'vitest/config'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
test: {
globals: true,
environment: 'jsdom'
},
define: {
'process.env': {}, // Replace process.env with an empty object for browser builds
},
build: {
lib: {
entry: 'lnbits/static/components/main.js',
name: 'LnbitsComponents',
fileName: 'components', // Output file name (build.js)
formats: ['umd']
},
minify: 'terser', // Optional: minify the output
rollupOptions: {
// If you have external dependencies, mark them here
external: []
},
outDir: 'lnbits/static/modules' // Output folder
}
})