utils/vite.config.ts
ztimson fbbe3c99ef
All checks were successful
Build / Build NPM Project (push) Successful in 37s
Build / Tag Version (push) Successful in 7s
Build / Publish Documentation (push) Successful in 1m43s
Updated ASet & Path Events
2024-10-17 10:24:18 -04:00

21 lines
456 B
TypeScript

import {resolve} from 'path';
import {defineConfig} from 'vite';
import dts from 'vite-plugin-dts';
export default defineConfig({
build: {
lib: {
entry: resolve(process.cwd(), 'src/index.ts'),
name: 'utils',
fileName: (module, entryName) => {
if(module == 'es') return 'index.mjs';
if(module == 'umd') return 'index.cjs';
}
},
emptyOutDir: true,
minify: false,
sourcemap: true
},
plugins: [dts()],
});