Skip to content

Commit 92a3c91

Browse files
Merge pull request #8 from cristian-spiescu/patch-1
Fixed error during "yarn build"
2 parents 5240c17 + 2d9c8fe commit 92a3c91

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ export const nodePolyfills = (options: Partial<PolyfillOptions> = {}): Plugin =>
6464
plugins: [
6565
{
6666
...inject({
67-
Buffer: 'Buffer',
68-
global: 'global',
69-
process: 'process',
67+
// cf. https://github.com/niksy/node-stdlib-browser/blob/3e7cd7f3d115ac5c4593b550e7d8c4a82a0d4ac4/README.md#vite
68+
global: [globalShims, 'global'],
69+
process: [globalShims, 'process'],
70+
Buffer: [globalShims, 'Buffer']
7071
}),
7172
},
7273
],

0 commit comments

Comments
 (0)