Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Example of using closure_js_binary to bundle an Angular application? #15

Closed
pshields opened this issue Nov 15, 2017 · 5 comments
Closed

Comments

@pshields
Copy link

Hi Alex! I'm attempting to develop some applications on the Angular+Bazel+Closure stack, and I'm running into the issue of lacking a build rule to produce the JS application bundle. I see from the wiki's "Coming soon" section that there will soon be "a production bundling/optimizing rule that generates a distribution of the app (or library)". Is the plan to modify the closure_js_binary rule to support that? Can you share a little bit more about what needs to be done to get that working?

The current issue I'm running into when I try to use the closure_js_binary rule is that when I add an ng_module target as a dependency, I get ERROR: [...] 'app_module' does not have mandatory providers: 'closure_js_library'. I notice a similar error occurs when I check out the closure_js_binary branch of this example repository and attempt to build //src:prod_bundle.

It's exciting to be able to build on this stack. Thanks for the contributions you're making to make it possible.

@alexeagle
Copy link
Contributor

bazelbuild/rules_typescript#74 is the next step.
Once we have that, I think compiling an Angular app won't be too hard since we already do it in google3 and this stack is very similar.

@alexeagle
Copy link
Contributor

I think @mrmeku is going to own this, and we'll do a hackathon in MTV the week of Dec 18 to put together a working prototype. Want to participate?

@pshields
Copy link
Author

pshields commented Dec 7, 2017

I'm no longer in MTV, but I'd be happy to help out online to the extent that I can. I don't have much experience implementing rules in Skylark and interacting with the Closure rule internals, but I can try to take on some smaller well-defined tasks or give feedback when trying to consume the rules from my projects.

@mrmeku
Copy link

mrmeku commented Dec 7, 2017 via email

@alexeagle
Copy link
Contributor

Let's track it in bazelbuild/rules_typescript#6

We'll naturally add an example as part of landing a major feature

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

No branches or pull requests

3 participants