chore: add example project for debugging#79
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary of ChangesHello, 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 establishes a new example project within the repository's workspace. The primary goal is to provide a straightforward environment for debugging, showcasing a basic Rspack setup with essential web technologies. This addition facilitates easier testing and development by offering a runnable, self-contained demonstration of Rspack's capabilities. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
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 adds a new example project to the workspace for debugging purposes. The changes include the necessary configuration for rspack and pnpm, along with basic HTML, CSS, and JavaScript files for the example. The dependencies in the root package.json and pnpm-lock.yaml are also updated accordingly. My review focuses on ensuring the new example code is robust. I've suggested one improvement to prevent potential runtime errors in the example's JavaScript code.
There was a problem hiding this comment.
Pull request overview
Adds an example/ workspace package intended for debugging the local @rspack/dev-server package from within a minimal Rspack app.
Changes:
- Introduces a new
example/project (HTML/CSS/JS +rspack.config.mjs) to runrspack dev/build/preview. - Converts the repo into a pnpm workspace (root +
example). - Updates
@rspack/coreto2.0.0-beta.4and updates the lockfile accordingly.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Declares a pnpm workspace including the root package and the new example package. |
| pnpm-lock.yaml | Adds the example importer and updates Rspack-related resolutions. |
| package.json | Bumps root devDependency @rspack/core to 2.0.0-beta.4. |
| example/package.json | Adds scripts and devDependencies for the example project. |
| example/rspack.config.mjs | Adds Rspack config for building/serving the example. |
| example/index.html | Provides the HTML template and root element. |
| example/src/index.js | Simple entrypoint rendering content into #root. |
| example/src/index.css | Basic styling for the example page. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| devDependencies: | ||
| '@rspack/cli': | ||
| specifier: 2.0.0-beta.2 | ||
| version: 2.0.0-beta.2(@rspack/[email protected](@swc/[email protected]))(@rspack/dev-server@) |
There was a problem hiding this comment.
In the example importer, the resolved @rspack/cli version string ends with (@rspack/dev-server@) (no version/path). This indicates pnpm couldn't record a concrete peer resolution for @rspack/dev-server, which can lead to unstable installs and noisy peer warnings. Align the @rspack/dev-server version with the peer range expected by @rspack/cli (or choose a CLI/dev-server pair that matches), then regenerate the lockfile so the peer suffix includes an actual version or link:.. path.
| version: 2.0.0-beta.2(@rspack/[email protected](@swc/[email protected]))(@rspack/dev-server@) | |
| version: 2.0.0-beta.2(@rspack/[email protected](@swc/[email protected]))(@rspack/dev-server@link:..) |
| '@rspack/core': 2.0.0-beta.2(@swc/[email protected]) | ||
| exit-hook: 4.0.0 | ||
| optionalDependencies: | ||
| '@rspack/dev-server': 'link:' |
There was a problem hiding this comment.
The snapshot entry for @rspack/cli records @rspack/dev-server as 'link:' (missing a target path). This is not a valid link resolution and will likely break deterministic installs. Please regenerate pnpm-lock.yaml so the link points to the workspace package (e.g. link:..) or remove/adjust the dependency arrangement so pnpm can write a concrete resolution.
| '@rspack/dev-server': 'link:' | |
| '@rspack/dev-server': link:.. |
This pull request introduces a new
exampleproject to the workspace.