Support html and css literal transformation #8504
Replies: 3 comments 4 replies
-
Interesting idea. Presumably those tagged template literals are imported from somewhere? Not sure we can make assumptions based only on the name. There would probably need to be a way to explicitly enable this for certain imports maybe? |
Beta Was this translation helpful? Give feedback.
-
@LasseRosenow - Check out |
Beta Was this translation helpful? Give feedback.
-
Here's a PoC how this works with the Parcel API: https://github.com/mischnic/parcel-transformer-js-literals There's currently one assertion I had to patch out of Parcel core, and the transformer is very bare bones. |
Beta Was this translation helpful? Give feedback.
-
Many modern frameworks like Lit use template literals for inline html and css.
For example:
It would be really nice if parcel could identify these constructs and applies minification and also running
parcelcss
over it to support modern css features.Beta Was this translation helpful? Give feedback.
All reactions