Add custom element to index.html on compiling
-
When use ‘quasar build’ command quasar will automatically create a index.html in
/dist/spa/index.html
.I would like to know if it is possible to add custom html element to this `index.html’ file?
Because I use quasar as the backend of my laravel web app, and there are some data need to bind into quasar app. The easiest way is add a html element into the index.html by data attribute element, and then used it in the quasar app.
-
To modify index.html you can modify the template
src/index.template.html
Here’s an example of conditionally including a .js file in index.template.html
<% if (htmlWebpackPlugin.options.ctx.dev) { %> <script src="statics/js/meteor.bundle.dev.js"></script> <% } %>
-
@dobbel Right. How can I missed that.
Thanks a lot!