Skip to content

Small changes to make j2cl and closure happier with this lib #69

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

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

niloc132
Copy link
Contributor

First, introduces a JS file for @externs, so that closure-compiler knows about the types and fields we insist will be present at runtime. If we had a real type for the constructor (instead of just Function), we would make a specific type for that instead. Without VCE, j2cl is believing that there is an actual module (closure, ecmascript, etc) names VueCustomElement instead of just a js.dot.separated.object. In theory we could change the name to something like name="VueCustomElement.createElement" instead, and mark the namespace as global, but it turns out that doesnt work in GWT2, so this hopefully serves as a consistent way to do it for everyone.

Finally, closure has changed its rules about invoking goog.define, the changes made here make it happy with our code. Chances are excellent we'll need to revisit superdevmode later and put it somewhere shared, but for now this at least compiles correctly.

@adrienbaron adrienbaron merged commit 6ed87c2 into VueGWT:develop Jan 15, 2020
@adrienbaron
Copy link
Collaborator

Thanks @niloc132 !

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

Successfully merging this pull request may close these issues.

2 participants