Skip to content

Commit 3f713e3

Browse files
committed
feat: upgrade vite-plugin-node-polyfills to version 0.22.0 and update Vite configuration for process and buffer shims
1 parent af31424 commit 3f713e3

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

examples/react-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@types/react": "18.3.1",
3030
"@types/react-dom": "18.3.0",
3131
"@vitejs/plugin-react": "4.2.1",
32-
"vite-plugin-node-polyfills": "0.17.0",
32+
"vite-plugin-node-polyfills": "0.22.0",
3333
"autoprefixer": "10.4.19",
3434
"postcss": "8.4.38",
3535
"tailwindcss": "3.4.3",

examples/react-app/vite.config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,18 @@ export default defineConfig({
1616
plugins: [tailwindcss()],
1717
},
1818
},
19+
build: {
20+
rollupOptions: {
21+
external: [
22+
'vite-plugin-node-polyfills/shims/process',
23+
'vite-plugin-node-polyfills/shims/buffer',
24+
],
25+
},
26+
},
27+
resolve: {
28+
alias: {
29+
process: 'vite-plugin-node-polyfills/shims/process',
30+
buffer: 'vite-plugin-node-polyfills/shims/buffer',
31+
},
32+
},
1933
});

pnpm-lock.yaml

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)