import { build } from "vite"; import postcssPresetEnv from "postcss-preset-env"; const libraries = [ { clearScreen: false, css: { postcss: { plugins: [postcssPresetEnv()] } }, build: { lib: { entry: './lib/ui.js', name: 'lib-ui', formats: ['umd'], fileName: (_format, name) => `${name}.min.js` }, rollupOptions: { output: { assetFileNames: info => info.name === 'style.css' ? 'ui.min.css' : info.name } }, sourcemap: true, emptyOutDir: false } }, { clearScreen: false, css: { postcss: { plugins: [postcssPresetEnv()] } }, build: { lib: { entry: './lib/app.js', name: 'lib-app', formats: ['umd'], fileName: (_format, name) => `${name}.min.js` }, rollupOptions: { output: { assetFileNames: info => info.name === 'style.css' ? 'app.min.css' : info.name } }, sourcemap: true, outDir: '../../../../IronIntel/Contractor2.0/Contractor/Site/js/lib', emptyOutDir: false } }, { clearScreen: false, build: { lib: { entry: './lib/utility.js', name: 'lib-utility', formats: ['umd'], fileName: (_format, name) => `${name}.min.js` }, sourcemap: true, emptyOutDir: false } } ] libraries.forEach(async b => await build(b))