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

Commit 8ba3a24

Browse files
Bump to Vite 4 and adding lib name
1 parent 005971e commit 8ba3a24

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

vite.config.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
import path from 'path'
1+
import { resolve } from 'path'
2+
import { defineConfig } from 'vite'
23

3-
export default ({ mode }) => {
4-
if (mode === 'netlify') return {}
4+
export default defineConfig(({ mode }) => {
5+
if (mode === 'netlify') {
6+
return {}
7+
}
58

69
return {
710
build: {
811
lib: {
9-
entry: path.resolve(__dirname, 'src/index.ts'),
10-
name: 'stimulus-notification'
12+
entry: resolve(__dirname, 'src/index.ts'),
13+
name: 'StimulusNotification',
14+
fileName: 'stimulus-notification'
1115
},
1216
rollupOptions: {
1317
external: ['stimulus-use', '@hotwired/stimulus'],
@@ -20,4 +24,4 @@ export default ({ mode }) => {
2024
}
2125
}
2226
}
23-
}
27+
})

0 commit comments

Comments
 (0)