Skip to content

Create webpack.yml - #83765

Closed
dofaromg wants to merge 1 commit into
vercel:canaryfrom
dofaromg:canary
Closed

dofaromg wants to merge 1 commit into
vercel:canaryfrom
dofaromg:canary

Conversation

@dofaromg

Copy link
Copy Markdown

No description provided.

Copilot AI 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.

Pull Request Overview

This PR adds a new GitHub Actions workflow to automate webpack builds for the Next.js repository. The workflow runs on pushes and pull requests to the canary branch.

Key changes:

  • Creates a new CI workflow for webpack builds
  • Configures testing across Node.js versions 18.x, 20.x, and 22.x
  • Sets up automated build steps using npm and webpack

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +27 to +28
npm install
npx webpack

Copilot AI Sep 14, 2025

Copy link

Choose a reason for hiding this comment

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

The workflow uses npm commands but Next.js uses pnpm as its package manager. The commands should be 'pnpm install' and 'pnpm webpack' to match the project's package management setup.

Suggested change
npm install
npx webpack
pnpm install
pnpm webpack

Copilot uses AI. Check for mistakes.
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Copilot AI Sep 14, 2025

Copy link

Choose a reason for hiding this comment

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

Missing cache configuration for node_modules. Add 'cache: pnpm' under the with section to speed up builds by caching dependencies.

Suggested change
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node-version }}
cache: npm

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +28
npm install
npx webpack

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.

It appears there's a package manager mismatch in this workflow. The PR description references pnpm prettier-fix, indicating the project likely uses pnpm, but the workflow uses npm install.

For consistency with the project's tooling:

  1. Consider replacing npm install with pnpm install
  2. The direct npx webpack call might not be the intended build command - most projects define specific build scripts in package.json (like pnpm build or pnpm webpack)

This will ensure the workflow aligns with the project's established dependency management and build processes.

Suggested change
npm install
npx webpack
pnpm install
pnpm build

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

Codex Review: Here are some suggestions.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +23 to +28
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install
npx webpack

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P1] Webpack job never succeeds without a project to build

The new workflow installs dependencies and then runs npx webpack at the repository root. This repo does not contain a root-level webpack configuration or src/index.js, so invoking webpack with no arguments will immediately error with “Configuration file not found”/“Module not found: ./src/index.js”. As a result the workflow will fail on every push/PR to canary, introducing a permanently red check. Consider removing the job or wiring it to an actual webpack project before enabling it.

Useful? React with 👍 / 👎.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants