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

Documentation for web_library #374

Open
sgammon opened this issue May 14, 2019 · 2 comments
Open

Documentation for web_library #374

sgammon opened this issue May 14, 2019 · 2 comments

Comments

@sgammon
Copy link
Contributor

sgammon commented May 14, 2019

Hey there rules_closure team - I'm getting an error trying to setup Bazel with the Closure toolchain:

ERROR: /datasync/ui/BUILD:13:1: Checking webfiles in //datasync/ui:popup failed (Exit 1)
ERROR: datasync/ui/popup.html: Referenced datasync.js (/datasync.js) without depending on a web_library() rule providing it
NOTE: Use suppress=["strictDependencies"] to make the errors above warnings
INFO: Elapsed time: 0.371s, Critical Path: 0.02s
INFO: 1 process: 1 worker.
FAILED: Build did NOT complete successfully

It would be massively helpful if someone could explain how to use web_library in conjunction with closure_js_library/closure_js_binary

@anantdamle
Copy link
Contributor

+1
how is web_library different than closure_js_binary?

@gkdn
Copy link
Collaborator

gkdn commented Feb 16, 2021

I think web_library was originally developed as a mechanism to bundle and serve web component which includes html and css in addition to JavaScript files. It takes validation beyond JS; provides validation across these assets and also defines how they will be served my server.
I'm not sure about the quality about those rules and they were mostly experimental and their development halted quite a while back.

In contrast, closure_js_binary is the top level bundler/optimizer rule for just JavaScript files. I am not sure what is original intended / best way to use web_library in conjunction with closure_js_binary however you can for sure use the output of closure_js_binary as an input to web_library as one of the assets.

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

3 participants