forked from moneybutton/paymail-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
37 lines (36 loc) · 1.04 KB
/
vite.config.js
File metadata and controls
37 lines (36 loc) · 1.04 KB
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
32
33
34
35
36
37
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import { defineConfig } from 'vite'
import { resolve } from 'path'
export default defineConfig({
test:{
include: ["test/*.js"]
},
build: {
lib: {
name: 'paymail-client',
entry: resolve(__dirname, 'src/index.js'),
formats: ['es', 'umd']
}
},
plugins: [
nodePolyfills({
// To add only specific polyfills, add them here. If no option is passed, adds all polyfills
include: [],
// To exclude specific polyfills, add them to this list. Note: if include is provided, this has no effect
exclude: [
],
globals: {
Buffer: true, // can also be 'build', 'dev', or false
global: true,
process: true
},
// Override the default polyfills for specific modules.
overrides: {
// Since `fs` is not supported in browsers, we can use the `memfs` package to polyfill it.
// fs: 'memfs',
},
// Whether to polyfill `node:` protocol imports.
protocolImports: true
})
]
})