-
Notifications
You must be signed in to change notification settings - Fork 22
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
Supporting :module-type
compiler option
#29
Comments
@shaunlebron this sounds great, I assume this doesn't have any impact on externs (i.e. they're still required)? |
Externs are no longer required in this case. The CommonJS/AMD/ES2015 module gets converted into a Google Closure Compiler module and can be consumed as such. |
Blocked by: http://dev.clojure.org/jira/browse/CLJS-1762 and probably other bugs will be found once Closure compiler has been updated. Currently module-type support is not good for other than very simple tests cases. For example npm modules can't be used. |
Now that there's |
Closure/ClojureScript doesn't currently support Node module resolution in classpath (e.g. Cljsjs JARs). Either files would need to be copied to filesystem in Cljs compiler, or something (Cljs, Cljsjs) should provide Closure node module resolution implementation which works with classpath. |
I see, thanks. |
Does the |
It doesn't solve this, it works around this. I'd still prefer solution which doesn't involve calling |
Also, when using |
I don't think there is anything to do related to Cljsjs here. Deps.cljs can be generated with |
I think it would be ideal to replace this (which doesn't even work on Node):
with this, by allowing an option
{:module-type :common-js}
:This option enables us to have the Closure compiler transform the library into a Closure module, rather than just pasting the library into the compiled output. Pending a future patch for a bug found in this process, I think supporting this new
module-type
option would be nice.Background references:
The text was updated successfully, but these errors were encountered: