Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Consider adding a single-module synchronous require to esriLoader #144

Closed
tomwayson opened this issue Nov 10, 2015 · 3 comments
Closed

Consider adding a single-module synchronous require to esriLoader #144

tomwayson opened this issue Nov 10, 2015 · 3 comments
Assignees
Milestone

Comments

@tomwayson
Copy link
Member

Checkout out Ken's answer to this SO question.

There are times when I want to be able to just use a module that I know is included in the build (like esri/config) in something like a module's run() that does not support async code. I think esri/basemap is included in the CDN builds too, so that means we could turn esriMapUtils.addCustomBasemap() into a synchronous function, and again, make it something that can be configured in the module's .run() in addition to a route's resolve.

Name could be esriLoader.requireSync()?

@jwasilgeo
Copy link
Contributor

Interesting and 🆒 idea. I vote for running with esriLoader.requireSync().

@tomwayson tomwayson modified the milestones: RC1, Beta 6 Nov 12, 2015
@tomwayson tomwayson self-assigned this Nov 14, 2015
@tomwayson
Copy link
Member Author

This didn't really work. I got a "undefinedModule" error for all modules that I tried to load this way (esri/config, esri/basemaps, esri/map). I blame Dojo.

Closing, as this is not worth our time right now.

@jwasilgeo
Copy link
Contributor

😢 Thanks for giving it a shot, though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants