Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information