Only use getInput function, the bundle size is more than 400k
Open
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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