Quasar: Allow to generate component library with Quasar

Created on 10 Sep 2019  路  3Comments  路  Source: quasarframework/quasar

Describe the solution you'd like
There are two situations that aren't supported currently that require an enhancement on quasar-cli in order to allow building a standard component library (not quasar's app extension mechanism). There are at least two use cases for this feature request:

  1. Create a component library to be used on plain Vue projects
  2. Create a Web Component to be used on any Web project (react, plain html, etc)

I built the following scenario without full success:

  • Project A: A vue-cli + quasar (as plugin) and using vue build --target lib, and npm publish
  • Project B: A plain Vue-cli project that includes Project A as JS dependency

The only problem I currently have with that scenario are Quasar styles. I've tried to following without success:

  1. Inject the Quasar stylesheet as UMD ( <link href=...).
    The problem with this approach is that quasar redefines some top level tags (h1,h2,etc) that affect the Project B's stylesheet.
  2. Include the Quasar stylesheet with:
    ```