nextjs-ssr
nextjs-ssr copied to clipboard
Support custom promise as remote value
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