chyingp / grunt-inline

Brings externally referenced resources, such as js, css and images, into a single file.
MIT License
87 stars 55 forks source link

Inlining into mustache template doesn't work #71

Open Eschon opened 8 years ago

Eschon commented 8 years ago

I have a mustache template that contains html and I try to inline a js file into it. Aside from the file extension and a few mustache tags its just normal HTML. The file that I want to inline is at the end of the body.

This is the script tag that I want to inline:

<script src="/tmp/map.js__inline=true"></script>

I also tried it without the =true and with the path relative to the file but nothing works, the line is unchanged and the console just prints

Running "inline:dist" (inline) task
Processing jssrc/skimap_container.mustache...OK

Does anyone know what the problem is?

kuzzmi commented 7 years ago

Long time no comments :) The problem is that you added __inline=true to the file extension, however it must be added as a query parameter to the URL: <script src="/tmp/map.js?__inline=true"></script>, note the ?