question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation on how to import components just using quasar-framework in existing application

See original GitHub issue

This does not exist at all and I am needing to hunt through the source code / install the CLI to try and set it up…

Copying some of the code showing how to instantiate Quasar from the template app, I have:

import App from './App.vue';
import Quasar from 'quasar-framework';

Vue.use(Quasar);

Quasar.start(function(){
    new Vue({ // eslint-disable-line no-new
        el: '#q-app',
        render: (h) => h(App)
    })
})

…but this errors on Vue.use:

Uncaught TypeError: _c is not a function
    at Proxy.render (quasar.common.js:1109) 

I just want to import <q-checkbox> haha! Is the component portion reliant on the whole Webpack/CLI build chain?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rstoenescucommented, Dec 18, 2016

@brokenalarms Quasar cannot be progressively added to a project. It’s an all or nothing deal.

  1. If you’re not using a Quasar app template / boilerplate then yes, some of the files may appear as if they do not exist. But in the template they do.
  2. All webpack rules are in the default app template.
  3. _THEME is a token that gets replaced by webpack (if you’re using the default Quasar app template) so it’s not even a variable.

Bottom line, sorry but you cannot cherry-pick components from Quasar. All Quasar code is written with performance in mind, and this sometimes leads to not being able to cherry-pick. There are a lot of reasons, most important one being that Quasar is not just a component library. It deals with much much more. Themeing assumes there are some CSS classes attached to the body. Cordova needs its own JS to be included and Quasar deals with starting a Cordova app with the help of Quasar.start() method. Reasons after reasons. Won’t go into details as this would take me a day 😃

0reactions
BrennaEppcommented, Oct 28, 2019

@brokenalarms Quasar cannot be progressively added to a project. It’s an all or nothing deal.

Bottom line, sorry but you cannot cherry-pick components from Quasar. All Quasar code is written with performance in mind, and this sometimes leads to not being able to cherry-pick. There are a lot of reasons, most important one being that Quasar is not just a component library. It deals with much much more. Themeing assumes there are some CSS classes attached to the body. Cordova needs its own JS to be included and Quasar deals with starting a Cordova app with the help of Quasar.start() method. Reasons after reasons. Won’t go into details as this would take me a day 😃

@rstoenescu Is this still the case? I’m trying to understand all what Quasar deals with in terms of Cordova and whether I can get rid of Quasar’s themeing while keeping other stuff, or if I can at least just use vue-cli-plugin-cordova + some quasar components

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Use Vue
Quasar components have names beginning with “Q” like “QBtn” or “QElementResizeObserver”. In order to use them, you need to add a reference to...
Read more >
Getting Started with the Quasar Framework
We will create a simple app with Quasar framework. ... still be available). Select Auto-import-in-use Quasar Components and hit Enter. ​.
Read more >
An Introduction To Quasar Framework: Building Cross- ...
These components make up the different parts of the application and can be reused and imported into your pages, layouts, and even other ......
Read more >
Introduction for Beginners
Single File Vue Components ... You'll be building your Quasar app using *.vue files which contain multiple sections: 'template' (HTML), 'script' (Javascript) and ......
Read more >
Quasar & Vue 3: State Management, Global Components ...
In this series, I'm gonna document my journey creating a Real World Quasar Framework app from scratch. This app that will ultimately be ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found