Production mode Java Script
Closed this issue · 2 comments
alabotski commented
- Add dependencies
implementation 'org.webjars.bower:jquery:3.3.1'
- Import JS
<link rel="import" href="../../../bower_components/3.3.1/dist/jquery.min.js">
or
@JavaScript("frontend://bower_components/3.3.1/dist/jquery.min.js")
The problem is that in development mode. The right way
frontend://bower_components/3.3.1/jquery/dist/jquery.min.js
But in production mode
frontend://bower_components/3.3.1/dist/jquery.min.js
alabotski commented
johndevs commented
Looks like the jquery webjar is not unpacked correctly. It should be unpacked to ../build/frontend/bower_components/jquery/dist/jquery.min.js
.