feat(wasm): run webpack loaders with systemjs#2360
Conversation
Summary of ChangesHello @xusd320, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly advances the browser-side build capabilities by integrating webpack loaders directly into a WebAssembly environment. It establishes a new worker-based architecture for running these loaders, leveraging SystemJS for module resolution and dynamically handling Node.js polyfills. The changes are demonstrated through an updated example application and supported by a new CLI tool for bundling worker scripts, ultimately enabling more sophisticated client-side compilation processes. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant feature: the ability to run webpack loaders in a browser/WASM environment using SystemJS. The changes are well-structured, involving conditional compilation for the WASM target, refactoring of import maps for Node.js polyfills, and the addition of a new worker and build scripts. My review focuses on the new worker implementation, where I've identified a debugger statement and opportunities to improve the polyfilling of Buffer and fs.readFile.
5c3be4e to
d429732
Compare
d429732 to
6295ee8
Compare
Now
webpack-loaderscan be run in browser, succeed example ofless-loaderinutooweb-demonext.js PR utooland/next.js#75