utils/vite.config.ts
ztimson 089b89b578
Some checks failed
Build / Build NPM Project (push) Failing after 6s
Build / Tag Version (push) Successful in 5s
Build / Publish (push) Successful in 10s
fixed name
2024-02-07 01:34:44 -05:00

18 lines
421 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: 'js-utilities',
fileName: (module, entryName) => {
if(module == 'es') return 'js-utilities.mjs';
if(module == 'umd') return 'js-utilities.js';
}
},
},
plugins: [dts()],
});