Using vue-cli plugin
-
Hi, I wanted to start an android + electron app. So I followed the guide to set up vue cli + typescript with the vue-cli-quasar plugin. My question is: How do I build and develop electron / android?
I am trying
quasar serve -m electron
but nothing really happens. Electron does not launch.
Also, there is no build command when using the quasar-cli 1.0.0-beta.4 (the basic quasar-cli said that my project has an invalid version)
Where is the documentation?Are we supposed to build using “npm run build”?
I am getting 2 linting errors there and I don’t know how to fix them:-
node_modules/quasar/dist/types"’ has no exported member ‘Quasar’.
-
node_modules/quasar/dist/types/index.d.ts
751:17 Generic type ‘Promise<T>’ requires 1 type argument(s).
749 | export interface QForm extends Vue {
750 | autofocus? : Boolean
751 | validate(): Promise
| ^If I have to use “npm run serve”, how can I specify what should be served (is there a good documentation)? By default it’s only starting the webapp.
I do hope anyone can help me.
Best regards
Scy -
-
Hi @scy - If you are using Vue-CLI, you must use that tool set to create your build pipeline. You cannot use Quasar’s. That is what the Quasar CLI is made for. In other words, if you want to use Quasar’s build system, you need to create a Quasar project from the Quasar CLI.
I hope that makes sense.
Scott
-
Ok, that makes sense. I just cannot find any helpful information of configuring it.
“Your Vue config (in package.json or vue.config.js file, depending on what you chose when you created your vue app) will also contain a quasar object with some basic Quasar configuration.”
And “Most important property is theme (with possible values “mat” or “ios”), which you can later change should you want.”That’s all documentation I found.
The file looks like:
module.exports = {
pluginOptions: {
quasar: {
treeShake: true,
},
},
transpileDependencies: [
/[\/]node_modules[\/]quasar[\/]/,
],
};https://v1.quasar-framework.org/start/vue-cli-plugin
https://github.com/quasarframework/vue-cli-plugin-quasarThen of course there is
https://v1.quasar-framework.org/quasar-cli/quasar-conf-js
I think it goes into the quasar object. But I had no luck so far.
mode: { electron: true },
Did not work and honestly, it’s feeling like guessing.I think I have to start over using the quasar-cli without typescript.
-
Yes. You need to use Quasar CLI.
You can use Quasar CLI and with TypeScript, with the TypeScript app extension.
https://v1.quasar-framework.org/app-extensions/introduction
https://github.com/quasarframework/app-extension-typescriptIt’s just getting going, so a good tester is always welcome.
Scott