Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NodeJS with Webpack
Comment thread
coderabbitai[bot] marked this conversation as resolved.

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
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 Badge Use repository build script instead of npx webpack

Running npx webpack here makes this workflow fail for this repository because the project does not define webpack in package.json or a webpack config/entrypoint, while its actual build is npm run build (tsup). In CI this step will either fail fetching/installing webpack or fail bundling due to missing src/index.js, so every push/PR to main can be marked red even when the code is healthy.

Useful? React with 👍 / 👎.

Comment thread
mohammedqanaam-art marked this conversation as resolved.