No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Add custom element to index.html on compiling

    Help
    compile compiler-build laravel
    2
    3
    455
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tc last edited by

      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.

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @tc last edited by

        @tc

        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>
            <% } %>
        
        T 1 Reply Last reply Reply Quote 0
        • T
          tc @dobbel last edited by

          @dobbel Right. How can I missed that.
          Thanks a lot!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post