nextjs-ssr icon indicating copy to clipboard operation
nextjs-ssr copied to clipboard

Support custom promise as remote value

Open ScriptedAlchemy opened this issue 3 years ago • 0 comments

Currently I support a single string syntax as the input. Remote: global@url

Adding support for a promise new promise value would enable managed modules and other at runtime decisioning

Remote: “promise new Promise(res=>{
 fetch(‘someapi’).then(()=>{
 Return ‘global@http://‘ 
}).then((dynamicConfig)=>{
Res(dynamicConfig)
})
})”

The idea here is that i still end up returning the current @ string syntax to the internal plugin mechanism. So all other parsing and setup can still be done, but would provide a functional way to determine what the string should be

ScriptedAlchemy avatar Feb 28 '22 02:02 ScriptedAlchemy