An open API service indexing awesome lists of open source software.

https://github.com/twhy/vite-joyid


https://github.com/twhy/vite-joyid

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Vite + JoyID

## Trouble Shooting
`Buffer is not defined`
1. Install `@esbuild-plugins/node-globals-polyfill`
2. In `vite.config.js`
```ts
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'

export default defineConfig({
// ...other config settings
optimizeDeps: {
esbuildOptions: {
// Node.js global to browser globalThis
define: {
global: 'globalThis'
},
// Enable esbuild polyfill plugins
plugins: [
NodeGlobalsPolyfillPlugin({
buffer: true
})
]
}
}
})
```