bertramdev / asset-pipeline

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

Assets with empty mapping not works if contextPath is specified #209

Closed ravikovour closed 6 years ago

ravikovour commented 6 years ago

In my grails application I want to access assets without appending /assets/ This will be useful so that I need not to append /assets where ever I am accessing static assets like html,images etc in my existing angularjs/plaing java code.

Create simple grails application grails create-app

In the application.groovy (grails-app/conf) I have added following grails.assets.mapping='' This works fine if I don't specify contextpath in application.groovy Eg: localhost:8080/grails.svg this works fine.

If I specify contextpath in application.groovy server.'contextPath' = '/AssetsApp' Eg: localhost:8080/AssetsApp/grails.svg - this will not work and gives 404 error Generally most of the web applications will have contextPath specified

Grails version : 3.3.2 com.bertramlabs.plugins:asset-pipeline-grails:2.14.7

davydotcom commented 6 years ago

Resolved for 3.0.2 release coming soon