Skip to content

fix(bundle): replace node:querystring with URLSearchParams for Webpack 5 compatibility - #51

Open
siddiqueirshad wants to merge 1 commit into
serpapi:masterfrom
siddiqueirshad:fix/issue-24-esm-webpack-imports
Open

siddiqueirshad wants to merge 1 commit into
serpapi:masterfrom
siddiqueirshad:fix/issue-24-esm-webpack-imports

Conversation

@siddiqueirshad

Copy link
Copy Markdown

Summary

This PR replaces node:querystring with standard web URLSearchParams parameter formatting and updates Node module imports to standard specifiers (https, http).

This fixes Webpack 5 module resolution errors when bundling serpapi in browser or frontend applications where Node built-in polyfills (such as querystring) are not present.

Fixes #24

@siddiqueirshad

Copy link
Copy Markdown
Author

Hi @strzibny, when you get a chance, could you please review this PR? It fixes issue #24 for Webpack 5 compatibility by replacing
ode:querystring\ with \URLSearchParams. Thanks!

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.

Module not found: Error: Can't resolve 'https'

1 participant