-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
31 lines (27 loc) · 1.05 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// vite.config.js
import { resolve } from 'path'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'
/** @type {import('vite').UserConfig} */
export default defineConfig({
build: {
target: 'modules',
lib: {
formats: ['es', 'cjs'],
entry: {
'index': resolve(__dirname, 'src/index.ts'),
'enums': resolve(__dirname, 'src/enums.ts'),
'helpers': resolve(__dirname, 'src/helpers.ts'),
'utilities': resolve(__dirname, 'src/utilities.ts'),
'GamepadApiWrapper': resolve(__dirname, 'src/GamepadApiWrapper.ts'),
'GamepadDisplay': resolve(__dirname, 'src/GamepadDisplay.ts'),
'GamepadEmulator': resolve(__dirname, 'src/GamepadEmulator.ts'),
},
name: 'VirtualGamepad',
// the proper extensions will be added
fileName: (format, entryName) => `${format != "es" ? format + "/" : ""}${entryName}.js`
},
sourcemap: true
},
plugins: [dts()]
})