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

    Import strategy for Vue CLI plugin?

    Framework
    3
    3
    760
    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.
    • P
      PS last edited by PS

      I’m running Quasar as a Vue plugin. My vue.config.js currenly looks as follows:

      module.exports = {
        pluginOptions: {
          quasar: {
            importStrategy: 'kebab',
            rtlSupport: false
          },
          webpackBundleAnalyzer: {
            openAnalyzer: true
          }
        },
        transpileDependencies: [
          'quasar'
        ],
        pwa: {
           [...]
          }
        }
      }
      
      

      The site works fine, but all Quasar components are imported, not just the ones I use. On the other hand, if I replace

      importStrategy: 'kebab'
      

      with

      all: 'auto'
      

      the site breaks; many components (e.g. QLayout, QList etc.) that are used aren’t included.

      I couldn’t find any documentation on the matter. Although the docs do have autoand all as possible values for importStrategy, if I try importStrategy: auto, I get an error:

      Incorrect setting for quasar > importStrategy (auto)
      Use one of: 'kebab', 'pascal', 'combined', 'manual'.
      

      This probably has something to do with v1.1.2 and issue #5098, but I’ve read through those and still can’t understand what the correct solution is.

      To add to the confusion, I also have the following in src/quasar.js:

      Vue.use(Quasar, {
        config: {
        },
        importStrategy: 'auto',
        components: { /* not needed if importStrategy is not 'manual' */ },
        directives: { /* not needed if importStrategy is not 'manual' */ },
        plugins: [
          Cookies,
          Notify
        ],
        lang: lang
      })
      
      

      So – where do I set the import strategy, and how do I do it properly?

      Thanks!

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

        You need to place it as such:

        framework:{ all:'auto' }

        1 Reply Last reply Reply Quote 0
        • M
          manubi last edited by

          @PS did you manage to change it as I am having the same problem?

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