Skip to content

Commit 98261e4

Browse files
committed
Add checks for bundled output in CI workflow for Vite, Webpack, Rollup, and Esbuild. This ensures that the generated bundle.js file exists after the build process, enhancing the reliability of the build steps.
1 parent 4fc480e commit 98261e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ jobs:
219219
}
220220
EOF
221221
npx vite build
222+
test -f dist/bundle.js
222223
223224
elif [ "${{ matrix.bundler }}" = "webpack" ]; then
224225
npm install --save-dev webpack webpack-cli
@@ -238,6 +239,7 @@ jobs:
238239
};
239240
EOF
240241
npx webpack --mode=production
242+
test -f dist/bundle.js
241243
# Test execution of bundled output
242244
node dist/bundle.js
243245
@@ -257,12 +259,14 @@ jobs:
257259
};
258260
EOF
259261
npx rollup -c
262+
test -f dist/bundle.js
260263
# Test execution of bundled output
261264
node dist/bundle.js
262265
263266
elif [ "${{ matrix.bundler }}" = "esbuild" ]; then
264267
npm install --save-dev esbuild
265268
npx esbuild index.js --bundle --outfile=dist/bundle.js --format=cjs --platform=node
269+
test -f dist/bundle.js
266270
# Test execution of bundled output
267271
node dist/bundle.js
268272
fi

0 commit comments

Comments
 (0)