utils/vite.config.ts
ztimson 85fc5f3017
Some checks failed
Build / Build NPM Project (push) Failing after 0s
Build / Tag Version (push) Has been skipped
Build / Publish (push) Has been skipped
Added mixin
2024-04-11 23:19:36 -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 'utils.mjs';
if(module == 'umd') return 'utils.cjs';
}
},
emptyOutDir: true,
minify: true,
sourcemap: true
},
plugins: [dts()],
});