Skip to content

Commit

Permalink
Allow globals to be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmyersdev committed Jun 9, 2023
1 parent be77fb0 commit 8cac924
Show file tree
Hide file tree
Showing 7 changed files with 1,041 additions and 52 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export default defineConfig({
exclude: [
'fs', // Excludes the polyfill for `fs` and `node:fs`.
],
// Whether to polyfill specific globals.
globals: {
Buffer: true, // can also be 'build', 'dev', or false
global: true,
process: true,
},
// Whether to polyfill `node:` protocol imports.
protocolImports: true,
}),
Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,21 @@
},
"scripts": {
"build": "vite build && tsc",
"test": "vite -c test/vite.config.ts build && vite -c test/vite.config.ts"
"test": "run-s test:build test:dev",
"test:build": "vite -c test/vite.config.ts build",
"test:dev": "vite -c test/vite.config.ts"
},
"packageManager": "pnpm@8.4.0",
"devDependencies": {
"@tanstack/react-query": "^4.29.12",
"@tanstack/react-query-devtools": "^4.29.12",
"@types/node": "^18.7.23",
"@vitejs/plugin-react": "^4.0.0",
"esbuild": "^0.16.16",
"npm-run-all": "^4.1.5",
"ohmyfetch": "^0.4.20",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^3.8.1",
"typescript": "4.8.3",
"vite": "^4.0.4",
Expand Down
Loading

0 comments on commit 8cac924

Please sign in to comment.