Skip to content

Commit d493987

Browse files
committed
fix(browser): polyfill assert, process
this commit fixes a regression that was introduced in 6702eae (#4073), where webpack 5 no longer polyfills certain node modules that stencil had assumed would exist. because these polyfills no longer exist in the form we previously expected them to be in, `require` statements are generated for them. however, `require` cannot run in the browser, causing scripts that import stencil to run their compilation in the browser to fail. this commit is inspired by the documentation for `resolve.fallback`, which redcirects module requests when normal resolution fails. the documentation provides a list of polyfills that webpack v4 would provide previously. this commit restores the two that we need. ref: https://webpack.js.org/configuration/resolve/#resolvefallback
1 parent 92fbd1c commit d493987

File tree

4 files changed

+482
-0
lines changed

4 files changed

+482
-0
lines changed

0 commit comments

Comments
 (0)