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
{{ message }}
This repository was archived by the owner on Mar 29, 2018. It is now read-only.
It would be great if we could streamline the usage of foreign modules.
I realize this isn't entirely the responsibility of this project, but some aspects will require changes here, and others will likely happen outside (likely via integrations)
Anyways, this is likely a good place to have this chat.
Scenario:
task.js
import{Promise}from'rsvp';// task.js stuff
expected outcomes:
bundle build: should inline RSVP
AMD/CJS/System build: should be built without RSVP
actual outcomes:
is awkward, some conventions here would be nice.
asserts due to missing module rsvp
thoughts:
can be solve by browserify (or browserify like step)
can be solved by marking a module as vendored. In the node world, the node resolution algorithm assumes relative paths to be package local, and absolute paths to be foreign. This provides us with the marker needed to detect vendor'd vs package local. Seems like following this pattern is a good idea.
another note: JSPM uses the ~ operator, to annotate the current project root this might work nicely to provide a root without confusing what might be vendored.
It seems like we may need the concept of a foreign module, one that defers to the formatter on how to resolve. The bundle case would need to materialize and inline, and the AMD/CJS would maybe just validate import/export statements but not bother materializing.
It would be great if we could streamline the usage of foreign modules.
I realize this isn't entirely the responsibility of this project, but some aspects will require changes here, and others will likely happen outside (likely via integrations)
Anyways, this is likely a good place to have this chat.
Scenario:
task.js
expected outcomes:
actual outcomes:
rsvpthoughts:
another note: JSPM uses the ~ operator, to annotate the current project
rootthis might work nicely to provide a root without confusing what might be vendored.It seems like we may need the concept of a foreign module, one that defers to the formatter on how to resolve. The bundle case would need to materialize and inline, and the AMD/CJS would maybe just validate import/export statements but not bother materializing.