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

Bundled version not working with Google Closure compiler #147

Open
davclark opened this issue Jun 1, 2020 · 1 comment
Open

Bundled version not working with Google Closure compiler #147

davclark opened this issue Jun 1, 2020 · 1 comment

Comments

@davclark
Copy link

davclark commented Jun 1, 2020

I'm trying to use the bundled wired-elements with ClojureScript / shadow-cljs as part of a community project. shadow-cljs uses Google's Java-based closure compiler, and gives me the following error:

Closure compilation failed with 3 errors
--- node_modules/wired-elements/lib/wired-elements-bundled.js:2
Class names defined inside a function cannot be reassigned.
--- node_modules/wired-elements/lib/wired-elements-bundled.js:28
Class names defined inside a function cannot be reassigned.
--- node_modules/wired-elements/lib/wired-elements-bundled.js:984
Class names defined inside a function cannot be reassigned.

Each of these lines appears to be a definition of a CSS :host rule inside a template string... so I'm not sure what the issue really is, and it may be due to shadow-cljs. While my project is using shadow-cljs, it is structured as a fairly typical npm project if you want to try running it yourself. The project in question is in the scrape-n-mail directory (after installing dependencies w/ npm install, I get the above error using npm run watch for example):

https://github.com/davclark/maybe-buddha/tree/wired

While this doesn't seem insurmountable, I'm not famliar with how you bundle things and what the right plan of attack would be. I'm happy to try to work up a PR with some guidance on how to do that!

And if this seems like the fault of shadow-cljs, please let me know and I'll go bother those fine people.

@pshihn
Copy link
Contributor

pshihn commented Jun 20, 2020

I know lit-element added support for Closure compiler, so there's a change things will work with the latest version. Try v2.1.0

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

2 participants