AdaptiveCards
AdaptiveCards copied to clipboard
sideEffects: false causing esbuild treeshaking to remove Carousel and Table
The adaptivecards package incorrectly has sideEffects set to false in the package.json
https://github.com/microsoft/AdaptiveCards/blob/66f566186ce579ea302f2be397f7da920ec4c24e/source/nodejs/adaptivecards/package.json#L17
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