microsoft / microsoft/AdaptiveCards
sideEffects: false causing esbuild treeshaking to remove Carousel and Table
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
The adaptivecards package incorrectly has sideEffects set to false in the package.json
This results in several elements, such as carousel and table, not working because of tree shaking in esbuild.
There's a workaround available by doing the following:
import * as AC from 'adaptivecards';
export class App {
#ac = AdaptiveCards;
}
Minimal repro:
Repro, broken
Repro, workaround
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
Start at source/nodejs/adaptivecards/package.json, especially the sideEffects entry, and reproduce the issue using the linked broken and workaround StackBlitz examples. Confirm that carousel and table continue working after esbuild tree shaking; the package metadata should no longer cause those elements to be removed.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100