Repository navigation
Create webpack.yml - #83765
Create webpack.yml#83765dofaromg wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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.
| npm install | ||
| npx webpack |
There was a problem hiding this comment.
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.
| npm install | |
| npx webpack | |
| pnpm install | |
| pnpm webpack |
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} |
There was a problem hiding this comment.
Missing cache configuration for node_modules. Add 'cache: pnpm' under the with section to speed up builds by caching dependencies.
| node-version: ${{ matrix.node-version }} | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm |
| npm install | ||
| npx webpack |
There was a problem hiding this comment.
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:
- Consider replacing
npm installwithpnpm install - The direct
npx webpackcall might not be the intended build command - most projects define specific build scripts in package.json (likepnpm buildorpnpm webpack)
This will ensure the workflow aligns with the project's established dependency management and build processes.
| npm install | |
| npx webpack | |
| pnpm install | |
| pnpm build |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
There was a problem hiding this comment.
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".
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Build | ||
| run: | | ||
| npm install | ||
| npx webpack |
There was a problem hiding this comment.
[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 👍 / 👎.
No description provided.