Open gsartori opened 2 weeks ago
It looks like is a Google Closure Compiler issue, the following configuration works (the only drawback is that the size of JS files is less optimized):
assets {
minifyCss = true
minifyJs = true
minifyOptions = [
//SIMPLE (default) or ADVANCED or WHITESPACE_ONLY
optimizationLevel: 'WHITESPACE_ONLY',
]
}
i do not think this is a problem with stomp.js
nor with closure-compiler
but with asset-pipeline-gradle
that pulls an old closure compiler version. ref: https://github.com/bertramdev/asset-pipeline/blob/rel-4.4.0/asset-pipeline-gradle/build.gradle#L41
i was able to reproduce the problem locally and for me, overriding the dependency version in build.gradle
in the buildSrc
directory worked:
// buildSrc/build.gradle
// ...
dependencies {
// ...
implementation("com.google.javascript:closure-compiler-unshaded:v20240317")
// ...
}
would u mind giving that a try?
and if that works, i think we could piggyback onto https://github.com/bertramdev/asset-pipeline/issues/326 asking for an update to v20240317
?
Okay, I tested it, it worked, thank you!
nice. thanks. then i guess the stomp.js issue you created can be closed?
i will amend the readme with this workaround until there is an asset-pipeline update available.
id prefer to keep this issue open until an asset-pipeline update is available and the workaround is no longer necessary.
but stomp-js/stompjs#634 can be closed?
thank you.
Yes, I've closed it
How to reproduce
implementation 'io.github.zyro23:grails-spring-websocket:2.6.0-RC1'
bootJar
Results
We get the following exception:
May be worth providing the minified js instead of the unminified one?