ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.41k stars 777 forks source link

compiler option to set shadow default #2818

Open dakom opened 3 years ago

dakom commented 3 years ago

Stencil version: 2.4.0

I'm submitting a: [x] feature request

Current behavior: When creating a design system, if a Shadow DOM strategy is taken in general, it must be opt-in on every single component

Desired behavior: A compiler option to set the default for shadow to either true or false, which could then be overridden by the component's setting if one is provided.

To maintain backwards compatibility, if the compiler option is not used, then the default for shadow could be false.

rwaskiewicz commented 2 years ago

This seems like a reasonable ask to me, I'm going to flag as something the community can vote on. I agree that for Stencil v2, it'd probably have to be an opt-in flag to maintain backwards compatability