2024-04-11 23:19:36 -04:00
|
|
|
import {resolve} from 'path';
|
|
|
|
import {defineConfig} from 'vite';
|
2024-02-07 01:33:07 -05:00
|
|
|
import dts from 'vite-plugin-dts';
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
build: {
|
|
|
|
lib: {
|
|
|
|
entry: resolve(process.cwd(), 'src/index.ts'),
|
2024-04-11 23:19:36 -04:00
|
|
|
name: 'utils',
|
2024-02-07 01:33:07 -05:00
|
|
|
fileName: (module, entryName) => {
|
2024-08-09 12:27:44 -04:00
|
|
|
if(module == 'es') return 'index.mjs';
|
|
|
|
if(module == 'umd') return 'index.cjs';
|
2024-02-07 01:33:07 -05:00
|
|
|
}
|
|
|
|
},
|
2024-04-11 23:19:36 -04:00
|
|
|
emptyOutDir: true,
|
2024-10-17 10:24:18 -04:00
|
|
|
minify: false,
|
2024-04-11 23:19:36 -04:00
|
|
|
sourcemap: true
|
2024-02-07 01:33:07 -05:00
|
|
|
},
|
|
|
|
plugins: [dts()],
|
|
|
|
});
|