26 lines
389 B
JavaScript
26 lines
389 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`
|
|
},
|
|
sourcemap: true
|
|
}
|
|
})
|
|
})
|