utils/vite.config.ts
ztimson a168b03caf
All checks were successful
Build / Build NPM Project (push) Successful in 47s
Build / Tag Version (push) Successful in 7s
Renamed entry point to index
2024-08-09 12:27:44 -04:00

21 lines
455 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: true,
sourcemap: true
},
plugins: [dts()],
});