-
Notifications
You must be signed in to change notification settings - Fork 84
Discussion: vendor deps #140
Comments
@stefanpenner this is related to #129, we are planning to reopen that discussion and try to find the right way of handling external modules. |
@eventualbuddha I think the bundle module approach we discussed would work really well here. If one could have options for: a) Exclude all non-relative modules from the current bundling process (build in Then those dependencies could be left in as ES6 imports. A separate transpilation run can then convert to AMD for example, or leave as ES6, depending on the requirements. I'd be really keen to use this functionality myself. |
This is what we have done so far: that resolver can be plugged into the container object, and it will try to resolve the module using NPM resolution mechanism, and if the resolved module has Here is a grunt task that uses it to bundle up ES6 modules a la browserify but without adding any extra overhead: https://github.com/caridy/grunt-bundle-jsnext-lib |
I'm hitting this issue as well. I need to simply use modules downloaded from npm. If we only support modules that have the fwiw, I'm going back to using webpack because it works awesomely in this regard. I can |
Personally I just use |
@domenic that would work, but not exactly desirable imho. Wouldn't that break bundling everything together into a single file for client-side stuff, since this project would only deal with |
I agree that this project alone does not address that use case. I suppose if I were working client-side I would place this project, or Traceur, first in the pipeline, combined with browserify as a second step. Well, actually, I wouldn't go to all that trouble; I would just use browserify and not try to |
Heh, yeah I pretty much agree. Currently using webpack actually and I'll probably just stick with it for now. I'd like to help push this forward though over the coming months. (edit: "this" being ES6/CJS integration somehow, maybe not in this specific project) |
working on https://github.com/polyfills/es6-module-crosspiler right now with this goal |
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:
rsvp
thoughts:
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.
The text was updated successfully, but these errors were encountered: