quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.56k stars 3.45k forks source link

Cordova router-link not work ! #573

Closed lyquocnam closed 7 years ago

lyquocnam commented 7 years ago

Hi author, i tried use this code to go other route:

<a v-link="{ path: '/hello' }">Hello</a>
<router-link :to="{ name: 'hello' }">Hello</router-link>

my terminal command:

quasar build
cd cordova
cordova run

but when run with cordova, it not happen. (it work fine on quesar dev)

image (i try to click hello to go Hello component)

my project: https://github.com/lyquocnam/quasar-test

lyquocnam commented 7 years ago

this debug detail as tutorial: image

report quasar bug

rstoenescu commented 7 years ago

Hi,

  1. I ran your project but could not reproduce. Routes change successfully.
  2. Seems like a package you are importing is throwing an error on your mobile, thus route change is halting (common Vue-Router behavior). My guess is that it's rxdb is at fault, so you might want to open up a ticket on their website.

Either way (a fault in Vue-Router or most likely a package you are importing), Quasar is not at fault.

Wish I could help more, but I am on a tight schedule for v0.14. Regards, Razvan

lyquocnam commented 7 years ago

@rstoenescu please see this, may this relate quasar-cli https://github.com/pubkey/rxdb/issues/172

rstoenescu commented 7 years ago

@lyquocnam Posted a message on that thread. Seems like they don't transpile their npm distributable, which is not the expected behavior when the package is used in a Webpack environment. Let's see what they say.

rstoenescu commented 7 years ago

Until rxdb figures it out, you can add an exception for running babel on rxdb too. Change /build/webpack.conf.js:

{
        test: /\.js$/,
        loader: 'babel-loader',
        include: projectRoot,
        exclude: /node_modules/ <<<<<<<<
      },

/node_modules/ should be /node_modules(?!\/rxdb)/ for you.

lyquocnam commented 7 years ago

i changed in webpack.base.config.js but not work !

 {
        test: /\.js$/,
        loader: 'babel-loader',
        include: projectRoot,
        exclude: /node_modules(?!\/rxdb)/
      },

image