DEV Community

Discussion on: Quasar and Vite - Frontend Application Development at Light Speed

Collapse
 
the_one profile image
Roland Doda

Hi Scott thanks for the article.

I am seeing the docs on "Convert project to Quasar CLI with Vite" and in the second step it says:

.

However, I do have a Vue 3 project created a while ago with Quasar CLI and I don't have the other folders (/src-cordova, /src-capacitor etc) except the /src and this is a bit confusing for me because I want the app to be build for mobile as well.

Can you expland on this please?
Should I create a /src-cordova or src-capacitor on the Vite version folder structure?

Collapse
 
smolinari profile image
Scott Molinari • Edited

No. You only copy over those folders, if you had been using those modes in Quasar. If you haven't used any of those modes, you don't need to worry about the folders. You just don't have any.

Collapse
 
the_one profile image
Roland Doda

Yeah I figured it out. I started converting the app to CLI with Vite and the most notable issues are:

  1. require cannot be used. I used require for images like <img :src="require('./my-image.png')" />
  2. importing components should have .vue extenstion. That was really tedious to fix since my IDE automatically import components as import MyComp from 'MyComp' but with Vite is required to have the .vue extension so import MyComp from 'MyComp.vue'
Thread Thread
 
smolinari profile image
Scott Molinari

You'll be happy you put in the effort though. :)

Thread Thread
 
the_one profile image
Roland Doda

Yup! Once I get it to work, I hope everything is smooth.

quasar.config.js is using commonjs though. Is there any way to make it work with es modules?

Thread Thread
 
smolinari profile image
Scott Molinari

You can follow this issue for that problem.

github.com/quasarframework/quasar/...

Thread Thread
 
the_one profile image
Roland Doda

😁😁 I am the one who opened that issue today 😁😁