enhanced icon indicating copy to clipboard operation
enhanced copied to clipboard

Feature Proposal: Remote as an Object

Open schirrel opened this issue 3 years ago • 4 comments

Can be seen as a simplification of the middleware. Provides an options to pass the remote values as an object that can:

  • add default async behavios
  • make it easer to manage the remote url for build or other dynamics, without had to deal with string concatenation also fixed the name on the file, sorry for that 😅

schirrel avatar Jul 22 '22 02:07 schirrel

when you had the time, please take a loook @ScriptedAlchemy @jacob-ebey 🙏🏻

schirrel avatar Jul 22 '22 02:07 schirrel

Im unsure why you want to add an async: true?

Is this purely so that the promise string can be hidden from the user and instead we create the factory for returning promise new promise?

Just want to understand what/how this would be a good method for taking away the ability to call promise new promise on your own out the box.

In its current form it looks like promise new promise just does what the @ syntax would, but as a custom promise without any ability to add additional things onto that promise new promise string. correct?

ScriptedAlchemy avatar Aug 01 '22 15:08 ScriptedAlchemy

hey @ScriptedAlchemy the reason for async : true is basically:

    1. yeah, have a factory to abstract a code that will always be pretty much the same
    1. avoid the required load of remote entry to initialize the app shell (current, if a remote is offline the whole shell wont load, instead of only when it is used)
    1. if a remote is offline, when try to use this, avoiding throw an exception. Like if i hade a page that use something from a offline remote, current (or with the 2 item here) it throw a exception and the whole page is not loaded, instead of only dont provide a single functionality

About thewebpack require.l i will work on it and test right now

schirrel avatar Aug 08 '22 11:08 schirrel

I've tried to use __webpack_require__.l but ir tried to request the remote on the load of the app shell/start :/

BTW the code on this PR also allow the default behavior of @ to keep being used, only changes the behavior if a object is passed

schirrel avatar Aug 08 '22 12:08 schirrel