ui-lib/vite.build.js

25 lines
366 B
JavaScript

import { build } from "vite";
const libraries = [
{
entry: './lib/ui.js',
name: 'lib-ui'
},
{
entry: './lib/utility.js',
name: 'lib-utility'
}
]
libraries.forEach(async (lib) => {
await build({
build: {
lib: {
...lib,
formats: ['umd'],
fileName: (_format, name) => `${name}.min.js`
}
}
})
})