Hi Tapestry users!
I'm deploying my first 5.5.0 app into production... and I checked that my
modules js doesnt work with production mode = true.
Example:
article.js:
define(["jquery", "prism"], *function*($, Prism) {
init = *function*(){
Prism && Prism.hasOwnProperty('default') ? Prism['default'] : Prism;
}
*return*{
init : init
}
});
ArticlePage.java
javaScriptSupport.require("article").invoke("init");
NOTE: It works fine with production mode = false.
The error is "RequireJS error: define: init is not defined, modules
article".
However, if I rewrite my module as below:
define(["jquery", "prism"], *function*($, Prism) {
*return* *function*(){
Prism && Prism.hasOwnProperty('default') ? Prism['default'] : Prism;
}
});
And my javacode to:
javaScriptSupport.require("article");
It works fine. But I want to define multiple functions inside the same
module.
In my apps in Tapestry 5.4.X I always use the modules as I wrote before.
Any suggestion?
For other hand, I think there is a missaligment on tapestry-webresources:
[image: image.png]
In my project, with maven 3.6.3 protobuf-java is 2.5.0 from less4j but
webapp breaks when it inits the closure compiler. I had to fix writing the
version in my pom to 3.0.2.
Best regards
Carlos Montero