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

    performace and importing components/plugins

    Help
    3
    3
    132
    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.
    • M
      mas last edited by mas

      Hello,

      The common way to add Quasar components to be available globally in the project is:

      return {
        framework: {
          components: [
            'QTooltip'
          ]
        }
      }
      

      However, some Quasar components maybe used on just one of my project pages in just one child component among multiple others. I import such rarely used Quasar components locally into that child component with:

      import { QTooltip } from 'quasar'
      

      and

      components: {
            QTooltip
          }
      

      which adds just a little bit more code. Is this approach correct and does it improve performance and memory consumption?
      Thank you!

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        Yes, that is the correct way to go about it.

        Also, if you use the component without the import and have the auto-import feature turned on, you don’t need to add the component to the framework.components property.

        https://quasar.dev/quasar-cli/quasar-conf-js#Auto-import-feature

        Scott

        1 Reply Last reply Reply Quote 0
        • S
          Sacrekin last edited by

          Moving to Auto import works, BUT only of import.quasar.js file generated in the .quasar folder is DELETED manually.

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