2024-02-07 01:33:07 -05:00
|
|
|
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'),
|
2024-02-07 01:34:44 -05:00
|
|
|
name: 'js-utilities',
|
2024-02-07 01:33:07 -05:00
|
|
|
fileName: (module, entryName) => {
|
2024-02-07 01:34:44 -05:00
|
|
|
if(module == 'es') return 'js-utilities.mjs';
|
|
|
|
if(module == 'umd') return 'js-utilities.js';
|
2024-02-07 01:33:07 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
plugins: [dts()],
|
|
|
|
});
|