You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But doing so makes you implicitly rely on your module being packaged as AMD (i.e. that an async require() function is available in the context). Once you package the module in a Node JS app, it will break. There is already a plan to fix this, but we cannot do that until modules have a better way to access external resources: #122.
Proposal: add a function to the Spaghetti class (nee SpaghettiConfiguration, see #126), so modules can load resources like that. It should look something like this:
In single file applications we could throw a runtime error, or we could assume that the application will be run as Node, and just use Node's require().
Right now if a module wants to load external resources, it cannot reliable do that. There is a hack that you can write:
But doing so makes you implicitly rely on your module being packaged as AMD (i.e. that an async
require()
function is available in the context). Once you package the module in a Node JS app, it will break. There is already a plan to fix this, but we cannot do that until modules have a better way to access external resources: #122.Proposal: add a function to the
Spaghetti
class (neeSpaghettiConfiguration
, see #126), so modules can load resources like that. It should look something like this:The text was updated successfully, but these errors were encountered: