Skip to content

Commit cab5e16

Browse files
committed
Updated vite config
1 parent 9e76a22 commit cab5e16

File tree

1 file changed

+6
-9
lines changed
  • session-signatures/generating-a-session/using-pkp/auth-with-google-oauth

1 file changed

+6
-9
lines changed

session-signatures/generating-a-session/using-pkp/auth-with-google-oauth/vite.config.ts

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@ import { defineConfig } from 'vite';
22
import react from '@vitejs/plugin-react';
33
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
44
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill';
5-
import rollupNodePolyFill from 'rollup-plugin-polyfill-node';
65
import { nodePolyfills } from 'vite-plugin-node-polyfills';
76

87
export default defineConfig({
9-
plugins: [
10-
react(),
11-
nodePolyfills({
12-
include: ['buffer', 'process', 'util'],
13-
}),
14-
],
8+
plugins: [react(), nodePolyfills()],
159
define: {
1610
'process.env': {},
1711
global: 'globalThis',
1812
},
1913
resolve: {
2014
alias: {
21-
// Remove the buffer alias
15+
buffer: 'buffer/',
16+
crypto: 'crypto-browserify',
17+
stream: 'stream-browserify',
18+
vm: 'vm-browserify',
2219
},
2320
},
2421
optimizeDeps: {
@@ -37,7 +34,7 @@ export default defineConfig({
3734
},
3835
build: {
3936
rollupOptions: {
40-
plugins: [rollupNodePolyFill()],
37+
plugins: [],
4138
},
4239
},
4340
});

0 commit comments

Comments
 (0)