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

    Build Quasar component library

    CLI
    3
    4
    434
    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.
    • J
      jigarzon last edited by jigarzon

      Hi. I have been investigating this for a few weeks, and my conclusion is negative.
      I cannot build a component library with quasar to be distributed to plain Vue projects.

      Let’s say, a chat application built with Quasar, and allow any Vue project to include it as a library.

      I’ve tried to build this with quasar-cli and vue-cli. With vue-cli I had better success, but I couldn’t make the quasar styles injected without affecting the “host” app.

      Do you know guys if there is a plan to support this kind of uses? Do you think that there could be a workaround to make this work?
      Thanks a lot in advance

      PS: App Extension is not a possibility because it requires Quasar on the client project.

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

        I’m not sure, but I think you could use the plug-in version of Quasar and build out a Vue plug-in with it, making Quasar a dependency of your plug-in. Have you thought about that?

        Scott

        1 Reply Last reply Reply Quote 0
        • J
          jigarzon last edited by

          Thanks @s-molinari for replying. I used exactly that for the best approach I could make. But I still have the problem of the quasar styles. I’m not a webpack expert. I could inject the styles with:

          <style lang="stylus" scoped>
          @import('../../node_modules/quasar/src/css/index.styl')
          

          But not all the styles got injected and it doesn’t look good (because some styles are missing, don’t know why)

          1 Reply Last reply Reply Quote 0
          • Allan-EN-GB
            Allan-EN-GB Admin last edited by

            I’ve had similar issues when injecting Quasar into a website using a Browser Extension. The thing is, Quasar assumes (and mostly - rightly so) that it’s the only app running on the page and therefore doesn’t scope a lot of the top level styles it uses.

            I did start looking into a custom loader to wrap all the CSS automagically but this was going to error prone and a lot of work.

            In short, it’s also something I’d like to raise internally but there can’t be any promises as to whether this would be resolved or not.

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