actions / actions/toolkit

Only use getInput function, the bundle size is more than 400k

Open
#1,959 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Only use getInput function, the bundle size is more than 400k

import { getInput } from '@actions/core'

console.log(getInput('name'))

To Reproduce

https://github.com/ahaoboy/core-bundle-test

git clone  https://github.com/ahaoboy/core-bundle-test
cd core-bundle-test
pnpm install
pnpm run bundle
> core-bundle@1.0.0 bundle C:\code\core-bundle
> esbuild --outdir=bundle --bundle --minify --platform=node --format=cjs src/action.ts --metafile=meta.json


  bundle\action.js  446.2kb

Expected behavior

Using only the getInput function shouldn't introduce such a huge dependency

Screenshots

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report in the linked core-bundle-test repository by running pnpm install and pnpm run bundle for src/action.ts. Inspect how importing getInput produces the 446.2kb bundle, then verify that a bundle using only getInput no longer introduces the unnecessary dependency size.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.