-
Notifications
You must be signed in to change notification settings - Fork 34
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
RequireJS Isolation for WebJars in Subprojects #39
Comments
Hmm... This is gonna be tricky. In the meantime you can pretty easily manually do what
Let me know if that helps. |
Thanks for the tip, @jamesward! I wasn't able to get that approach working, but I only took a quick stab and I've got to switch gears now (I'll circle back later). I'm guessing this issue might shake out if there ends up being a well-engineered solution to the latter. On that note, would you like a Gist of my project? |
Sure! A simple reproducible project will definitely help us get this figured out. |
Hi! I'm just a few months into play & scala, and I'm experiencing this problem. i am quite interested in how you got it working @michaelahlers! Currently, in a main.scala.html, it looks like:
And in a subproject.routes, it looks like:
both of which gives me an error. Some pointers would be nice =) Thanks in advance! |
I'm trying to use the RequireJS support in subprojects, and I've run into a couple snags.
To start,
org.webjars.play.RequireJS
assumes the reverse router will live in acontrollers
package. I was able to come up with a copy that parameterizes that package name. However, I ran into another problem afterwards.To prove my solution, I had one subproject's
build.sbt
depend on version X of a library, and the other subproject depend on version Y. Both end up loading version Y (the highest lexigraphically) asorg.webjars.WebJarAssetLocator
makes no distinction by project. Worse, if I remove the dependency from either project, both still have access.My guess is this isn't easily solvable with Play's classloading (i.e., I can't spot any straight-forward way to give
WebJarAssetLocator
a kind of scope for discovery). That said, if this team has any ideas that could make this possible, I'm all ears.If it'll help, I'll be happy to assemble a sample project.
The text was updated successfully, but these errors were encountered: