mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-28 00:10:00 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
baa084ea3c | ||
|
|
de3e223828 | ||
|
|
c77833e8ed |
No files matched your search
@@ -0,0 +1,46 @@
|
||||
name: Vite Bundle Visualizer
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ chore/all-my-stuffs ]
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- run: |
|
||||
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
|
||||
npm install -g corepack@latest
|
||||
echo "After : corepack version => $(corepack --version)"
|
||||
corepack enable
|
||||
pnpm --version
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm i --ignore-scripts
|
||||
|
||||
# Ensure vite-bundle-visualizer is installed
|
||||
# (or remove this step if already in package.json)
|
||||
- name: Install visualizer
|
||||
run: pnpm install --save-dev vite-bundle-visualizer
|
||||
|
||||
- name: Build the app
|
||||
run: pnpm build
|
||||
|
||||
- name: Generate bundle visualizer report
|
||||
run: |
|
||||
# Generate stats.html using npx
|
||||
npx vite-bundle-visualizer dist --template treemap --open false
|
||||
|
||||
|
||||
- name: Upload bundle visualizer report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bundle-visualizer-report
|
||||
path: dist/stats.html
|
||||
if-no-files-found: error
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user