whatwg / loader

Loader Standard
https://whatwg.github.io/loader/
Creative Commons Zero v1.0 Universal
609 stars 45 forks source link

8.1. Site Packages should not be Browser specific (or even called site-packages just packages) #14

Open johnjbarton opened 9 years ago

johnjbarton commented 9 years ago

This feature maps package names to root paths for resolving modules. Nothing about this functionality is specific to Browsers.

Developers want to be able to write source code that uses packages then import that code into any JS environment, whether it is browser, node, or future runtimes. Package name mapping separates the specification of the module-in-the-package from the specification of the path-to-the-package. The latter then can be configured when the packages are combined into an application.

In other words, developers need this feature to be independent of the runtime. No technical issue that I know about prevents such use. Really if you look at the API is just a Loader-blessed dictionary. Nothing about browsers involved.

caridy commented 9 years ago

We have a base loader, a default browser loader spec, and in the near future, a default node loader spec as well. SitePackage was deferred to stage 3 https://github.com/whatwg/loader/blob/master/roadmap.md#stage-3-conveniences, and https://github.com/whatwg/loader/pull/65 removes it from the spec, we will get back to it at some point. Let's keep this issue open for now.