Skip to content

Request: Enhance "transforms" plugins #67

@tbeseda

Description

@tbeseda

@enhance/ssr allows for script and css transformations, would it be possible to plug in custom transforms alongside the standard ones provided by arc-plugin-enhance here

const _html = enhance({
elements,
scriptTransforms: [
importTransform({ lookup: arc.static })
],
styleTransforms: [
styleTransform
],
initialState: store
})


No idea how this would look for a plugin author...

So far Enhance has intentionally (wisely!) avoided an explicit configuration file. Maybe transforms could be added via a file-based API?
plugins/transforms/css/index.mjs
I'm not sold, but it's a thought.

I don't think Enhance needs these sort of plugins, but it would open up some powerful possibilities. On the other hand it could have a negative performance impact and lead to some plugin author/consumer anti-patterns and footguns. On the other other hand, can't save everyone from themselves 😬

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions