AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

sideEffects: false causing esbuild treeshaking to remove Carousel and Table

Open JaccovdP opened this issue 9 months ago • 0 comments

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

JaccovdP avatar Mar 25 '25 15:03 JaccovdP