-
Notifications
You must be signed in to change notification settings - Fork 112
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
CSS rewriting not working in JS templates #401
Comments
Did some digging and it definitely seems like rules_closure is doing what it should. Cross-filed with GCC at google/closure-compiler#3427. |
after some discussion on google/closure-compiler#3427, and a sample repo at sgammon/css-rewrite-bug, it has been determined it isn't the compiler, which of course was likely. it now seems like it might be an issue inside J2CL, because i can't get btw if you are getting issues with symbols-already-defined for |
The issue is that you set
We should probably automatically add the css rewrining map as an entry point. |
Also, |
tl;dr CSS rewriting does not seem to be working, at least in terms of JS' invocation of
getCssName
.Given the following setup (
WORKSPACE
and related wiring omitted):sample.soy
:sample.css
:sample.js
:BUILD.bazel
:When I build and run the resulting JS, the template renders, but it renders with the original CSS names, whereas, the CSS has been rewritten. This breaks styles, of course.
Digging into the intermediates:
bazel-out/darwin-fastbuild/bin/.../sample.js-0.params
:The last entry in the set of input files, is a file that ends in
css.js
. Examining that file, it looks like we're on the money:In the generated template file, it seems to know what's going on (as in, it's using
goog.getCssName
):But, in the final output JS, it uses the original classes:
Anybody have any ideas? Or, at least, is anyone seeing the same behavior?
The text was updated successfully, but these errors were encountered: