fix: update package.json and vite.config.ts#174
Conversation
rtomas
commented
Jan 28, 2026
- Change development server port to 3000 in package.json
- Add node-globals-polyfill dependency
- Update vite.config.ts to include NodeGlobalsPolyfillPlugin for better global variable handling
- Change development server port to 3000 in package.json - Add node-globals-polyfill dependency - Update vite.config.ts to include NodeGlobalsPolyfillPlugin for better global variable handling
|
Claude finished @rtomas's task in 59s —— View job 🔍 Code ReviewFound 3 issue(s)Issue 1: Polyfill package misplaced in dependenciesID: package-polyfill-placement-a7c4 Context:
Recommendation: Move to devDependencies: "devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
...
}Issue 2: Removed process.env polyfill may break codeID: viteconfig-process-removed-f8e1 Context:
Recommendation: Retain process.env polyfill alongside new globals: optimizeDeps: {
esbuildOptions: {
define: {
global: 'globalThis',
'process.env': '{}'
},
plugins: [...]
}
}Issue 3: Version inconsistency across examplesID: package-deps-mismatch-b2d9 Context:
Recommendation: Align versions with other examples (react-wagmi): "@tanstack/react-query": "^5.90.3",
"viem": "2.38.1",
"wagmi": "^2.18.0" |
| "preview": "vite preview" | ||
| }, | ||
| "dependencies": { | ||
| "@esbuild-plugins/node-globals-polyfill": "0.2.3", |
There was a problem hiding this comment.
🤖 Auto Review Issue: Polyfill package misplaced in dependencies
Severity: LOW
Category: code_quality
Tool: Claude Auto Review
Context:
- Pattern:
@esbuild-plugins/node-globals-polyfilladded todependenciesinstead ofdevDependencies - Risk: Build-time plugin included in production bundle unnecessarily, increasing package size
- Impact: Larger node_modules in production deployments, confusion about runtime vs build dependencies
- Trigger: Every production install/deployment
Recommendation: Move to devDependencies:
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
...
}| }, | ||
| optimizeDeps: { | ||
| esbuildOptions: { | ||
| define: { |
There was a problem hiding this comment.
🤖 Auto Review Issue: Removed process.env polyfill may break code
Severity: MEDIUM
Category: code_quality
Tool: Claude Auto Review
Context:
- Pattern: Original
define: { 'process.env': {} }removed, replaced withglobal: 'globalThis'in esbuildOptions - Risk: Code using
process.envwill now throw ReferenceError instead of returning empty object - Impact: Runtime errors if any dependency or app code references
process.env.* - Trigger: Any code path accessing process.env
Recommendation: Retain process.env polyfill alongside new globals:
optimizeDeps: {
esbuildOptions: {
define: {
global: 'globalThis',
'process.env': '{}'
},
plugins: [...]
}
}