Skip to content

Commit c06a26c

Browse files
sserrataclaude
andauthored
fix(theme): add path-browserify webpack fallback for browser bundling (#1344)
* fix(theme): add path-browserify webpack fallback for browser bundling postman-code-generators 2.1.1 introduced a require('path') call in the dart-dio codegen which Webpack cannot resolve in a browser context. Adding path-browserify as a resolve.fallback alongside the existing buffer fallback fixes the build without requiring changes from consumers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(theme): add path-browserify as explicit dependency Required by the path resolve.fallback added in configureWebpack to support postman-code-generators 2.1.1+ browser bundling. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e87a82b commit c06a26c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/docusaurus-theme-openapi-docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"@reduxjs/toolkit": "^2.8.2",
4848
"allof-merge": "^0.6.6",
4949
"buffer": "^6.0.3",
50+
"path-browserify": "^1.0.1",
5051
"clsx": "^2.1.1",
5152
"copy-text-to-clipboard": "^3.2.0",
5253
"crypto-js": "^4.2.0",

packages/docusaurus-theme-openapi-docs/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default function docusaurusThemeOpenAPI(): Plugin<void> {
4242
resolve: {
4343
fallback: {
4444
buffer: require.resolve("buffer/"),
45+
path: require.resolve("path-browserify"),
4546
},
4647
},
4748
plugins: [
@@ -71,6 +72,7 @@ export default function docusaurusThemeOpenAPI(): Plugin<void> {
7172
resolve: {
7273
fallback: {
7374
buffer: require.resolve("buffer/"),
75+
path: require.resolve("path-browserify"),
7476
},
7577
},
7678
plugins: [

0 commit comments

Comments
 (0)