caiobiodere / cordova-template-framework7-vue-webpack

Framework7 - Vue - Webpack Cordova Template with Webpack Dev Server and Hot Module Replacement
Apache License 2.0
620 stars 154 forks source link

"cordova run browser" and "cordova run browser -- --live-reload" yeild different results for stylesheet inclusion #106

Closed thekswenson closed 6 years ago

thekswenson commented 6 years ago

From a fresh template, I've modified index.html with the line: <link rel="stylesheet" type="text/css" href="src/assets/css/mystyles.css">

I put the file mystyles.css in the "src/assests/css/" directory.

When I run cordova run browser I see that the CSS file is included:

200 /src/assets/css/wingtips.css

and the style of everything that should be affected in the home.vue template is affected in the intended way. However, when I run cordova run browser -- --live-reload it appears as though the stylesheet is not loaded.

I'm guessing I'm doing something wrong, but it's strange that things are different depending on the two methods. I'm new to this.

caiobiodere commented 6 years ago

You don't need to change your index.html file, just change your main.js file using this reference:

// Import MyStyles from assets import MyStyles from './assets/css/mystyles.css'

thekswenson commented 6 years ago

Yes... thank you very much for the tip!