bertramdev / asset-pipeline

The core implementation of the asset pipeline for the jvm
193 stars 92 forks source link

Grails 3.2.11 in multi projet setup, plugin's asset are not reference in GSP with cached digest name #184

Closed runwolf closed 6 years ago

runwolf commented 7 years ago

Grails version: 3.2.11 Groovy version: 2.4.11 JVM version: 1.8.0_144 assetPipeline - 2.14.3 Deploy as a war in tomcat 8

I have a project build with the sub project structure and I am using grails 3.2.11. All my asset get package and deliver properly for the main project using the cache-digest names. But if I call a controller in a plugins that's package with my main project, I can see the compile version of the asset with the digest name but the gsp still call the original asset name, no digest. If the plugins reference asset in my main project, it gets the digest version.

Problem is some browser seem to cache those files and don't get the new versions some time.

Is this a configuration issue or there is an issue with asset-pipeline ?

davydotcom commented 6 years ago

probably not using packagePlugin feature to properly package assets from the source plugin. Theres a flag you should put in your build.gradle for your plugins in the assets{} block called packagePlugin = true

http://www.asset-pipeline.com/manual/index.html#configuration

This tells asset-pipeline not to precompile these assets in the plugin and leave them free to be bundled via the final application manifest.