Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cram should not output the moduleLoader's prefix to the bundle #25

Closed
unscriptable opened this issue Aug 12, 2013 · 2 comments
Closed

Comments

@unscriptable
Copy link
Member

In short: cram should output define("backbone/backbone", ... not define("curl/loader/cjsm11!backbone/backbone"... as a plugin would. curl/cram module loaders are plugins that are used implicitly, but need to output normal-looking modules.

Plugins always prefix their compiled resources with the plugin id. This is so that a dev can request the same resource at run-time (from outside the bundle, for instance), and it will match.

On the other hand, CJS modules are supposed to be loaded transparently (no explicit module id) so the plugin id should be left out. I guess I hadn't thought this through, yet. This makes sense to me.

Also: ES6 module loaders will allow cross-compiled ("transpiled") modules and will likely work similarly (the module loaders won't have to be explicit).

@gehan
Copy link
Contributor

gehan commented Aug 14, 2013

This should fix it! #26

@unscriptable
Copy link
Member Author

Closed by #26. Thanks Gehan!

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

No branches or pull requests

2 participants