Skip to content

chore: add example project for debugging#79

Merged
chenjiahan merged 2 commits into
mainfrom
add_example_0227
Feb 27, 2026
Merged

chore: add example project for debugging#79
chenjiahan merged 2 commits into
mainfrom
add_example_0227

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

This pull request introduces a new example project to the workspace.

Copilot AI review requested due to automatic review settings February 27, 2026 07:36
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 Example Project: A new example project has been introduced to the workspace, providing a basic Rspack setup for debugging purposes.
  • Rspack Configuration: The example project includes a minimal Rspack configuration (rspack.config.mjs) to bundle HTML, CSS, and JavaScript assets.
  • Dependency Updates: The main package.json and pnpm-lock.yaml files have been updated to reflect the new Rspack dependencies and their versions, specifically upgrading @rspack/core to 2.0.0-beta.4.

🧠 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
  • example/index.html
    • Added a new HTML file to serve as the entry point for the example application.
  • example/package.json
    • Added a new package.json defining the example project's metadata, scripts (dev, build, preview), and Rspack-related development dependencies.
  • example/rspack.config.mjs
    • Added a new Rspack configuration file, setting up entry points, browser targets, module rules for CSS, SVG, and JavaScript (using swc-loader), and an HTML Rspack Plugin.
  • example/src/index.css
    • Added a new CSS file providing basic styling for the example application's body and content elements.
  • example/src/index.js
    • Added a new JavaScript entry file that imports the CSS and dynamically renders a simple 'Vanilla Rspack' message into the HTML root element.
  • package.json
    • Updated @rspack/core dependency from 2.0.0-beta.2 to 2.0.0-beta.4.
  • pnpm-lock.yaml
    • Updated various @rspack related dependencies (e.g., @rspack/core, @rspack/binding-*) to version 2.0.0-beta.4.
    • Added new dependency entries for the example project, including @rspack/cli, @rspack/core, and @rspack/dev-server.
    • Included new package entries for @discoveryjs/json-ext and exit-hook.
    • Updated css-loader to reflect the new @rspack/core version.
  • pnpm-workspace.yaml
    • Added the example directory to the pnpm workspace configuration, integrating it into the monorepo structure.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread example/src/index.js

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 run rspack dev/build/preview.
  • Converts the repo into a pnpm workspace (root + example).
  • Updates @rspack/core to 2.0.0-beta.4 and 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.

Comment thread pnpm-lock.yaml
devDependencies:
'@rspack/cli':
specifier: 2.0.0-beta.2
version: 2.0.0-beta.2(@rspack/[email protected](@swc/[email protected]))(@rspack/dev-server@)

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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:..)

Copilot uses AI. Check for mistakes.
Comment thread pnpm-lock.yaml
'@rspack/core': 2.0.0-beta.2(@swc/[email protected])
exit-hook: 4.0.0
optionalDependencies:
'@rspack/dev-server': 'link:'

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
'@rspack/dev-server': 'link:'
'@rspack/dev-server': link:..

Copilot uses AI. Check for mistakes.
Comment thread example/package.json
@chenjiahan chenjiahan merged commit 25b010d into main Feb 27, 2026
3 of 4 checks passed
@chenjiahan chenjiahan deleted the add_example_0227 branch February 27, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants