Skip to content

Commit

Permalink
build: adjust output file name
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-fish committed Feb 18, 2024
1 parent a644eb5 commit 3f43a33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export default defineConfig({
build: {
lib: {
name: 'Fexios',
fileName: 'index',
fileName: (format) => {
return format === 'es' ? 'index.mjs' : `index.${format}.js`
},
entry: resolve(__dirname, 'src/index.ts'),
formats: ['umd', 'es', 'iife'],
},
Expand Down

0 comments on commit 3f43a33

Please sign in to comment.