New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(agnostification): eliminate common's dependent on isNode check. #6737
Conversation
chore(agnostification): add Config for common chore(agnostification): move Config to common dir and add path config chore(agnostification): fix debug function not set error
Jack, PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! I have a few comments and considerations with regards to future web optimisations we can make & eliminating Node code from our web bundle all together, but I like this direction and idea 👍
Jack, could you PTAL and see if your feedback was addressed? Thanks! |
This is looking really good, thanks! I have one final though and then I think we can try to get this in. |
related to #6125
by add a Config module which contains the node specific packages(ws, fs etc), let the common depend on it(dependeny injection), we can remove isNode check in common code, as well as dynamic imports.
every entry(node, web) needs initialize the Config before export the Puppeteer object.
this way, we may support some kind of support for filesystem in the browser(normal webpage or chrome extension).