Hi folks :slightly_smiling_face: I'm trying to use...
# questions
g
Hi folks 🙂 I'm trying to use the webjars provided by Grails 7 in my app, here is the
includes.js
file:
Copy code
// From Grails 7 included webjars
//= require webjars/dist/jquery.js
//= require webjars/dist/js/bootstrap.bundle.js
In the view:
Copy code
<asset:javascript src="includes.js"/>
This is my
build.radle
:
Copy code
assets {
    minifyCss = true
    minifyJs = true
    minifyOptions = [
            //SIMPLE (default) or ADVANCED or WHITESPACE_ONLY
            optimizationLevel: "SIMPLE",
    ]
    excludes = [
            'webjars/jquery/**',
            'webjars/bootstrap/**',
            'webjars/bootstrap-icons/**',
    ]
    includes = [
            'webjars/jquery/*/dist/jquery.js',
            'webjars/bootstrap/*/dist/js/bootstrap.bundle.js',
            'webjars/bootstrap/*/dist/css/bootstrap.css',
    ]
}
They are not included. Building a
jar
shows:
Copy code
11:06:33.369 [pool-1-thread-2] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/jquery.js
11:06:33.372 [pool-1-thread-2] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/js/bootstrap.bundle.js
11:06:36.139 [pool-1-thread-10] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/jquery.js
11:06:36.140 [pool-1-thread-10] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/js/bootstrap.bundle.js
11:06:36.567 [pool-1-thread-4] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/css/bootstrap.css
11:06:39.512 [pool-1-thread-8] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/css/bootstrap.css
What am I doing wrong?