Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
Bump to Vite 4 and adding lib name
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebriday committed Dec 23, 2022
1 parent 0a936bb commit 5d0770b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import path from 'path'
import { resolve } from 'path'
import { defineConfig } from 'vite'

export default ({ mode }) => {
if (mode === 'netlify') return {}
export default defineConfig(({ mode }) => {
if (mode === 'netlify') {
return {}
}

return {
build: {
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
name: 'stimulus-dropdown'
entry: resolve(__dirname, 'src/index.ts'),
name: 'StimulusDropdown',
fileName: 'stimulus-dropdown'
},
rollupOptions: {
external: ['stimulus-use', '@hotwired/stimulus'],
Expand All @@ -20,4 +24,4 @@ export default ({ mode }) => {
}
}
}
}
})

0 comments on commit 5d0770b

Please sign in to comment.