Skip to content

fix(docs): add Buffer polyfill for API Explorer - #390

Merged
javi11 merged 1 commit into
mainfrom
fix/buffer-polyfill-api-explorer
Mar 6, 2026
Merged

fix(docs): add Buffer polyfill for API Explorer#390
javi11 merged 1 commit into
mainfrom
fix/buffer-polyfill-api-explorer

Conversation

@javi11

@javi11 javi11 commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Installs the buffer npm polyfill package in docs/
  • Updates the webpack plugin in docusaurus.config.ts to add buffer to resolve.fallback and inject Buffer globally via webpack.ProvidePlugin
  • Fixes ReferenceError: Buffer is not defined crash when opening /api-explorer (swagger-ui-react uses Buffer as an implicit global which doesn't exist in browsers)

Test plan

  • cd docs && bun run build completes without errors
  • cd docs && bun run start → open /api-explorer → Swagger UI renders correctly with no console errors

🤖 Generated with Claude Code

Add `buffer` npm package and configure webpack ProvidePlugin so that
`Buffer` is available as a global in the browser bundle, fixing the
`ReferenceError: Buffer is not defined` crash on the /api-explorer page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@javi11
javi11 merged commit ee82e98 into main Mar 6, 2026
2 checks passed
@javi11
javi11 deleted the fix/buffer-polyfill-api-explorer branch March 6, 2026 09:26
yoshitaka420 pushed a commit to yoshitaka420/altmount that referenced this pull request Jun 1, 2026
Add `buffer` npm package and configure webpack ProvidePlugin so that
`Buffer` is available as a global in the browser bundle, fixing the
`ReferenceError: Buffer is not defined` crash on the /api-explorer page.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant