@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 😬
@enhance/ssrallows for script and css transformations, would it be possible to plug in custom transforms alongside the standard ones provided byarc-plugin-enhanceherearc-plugin-enhance/src/http/any-catchall/router.mjs
Lines 132 to 141 in f6dcdd4
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.mjsI'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 😬