How to upgrade to new version?
What is best way to upgrade/ migrate to new version of quasar? You suggested somewhere to do:
npm update quasar-framework
To me it seems this just updates the Node package, right? Whereas for upgrading to 0.9.1 there are different packages in package.json and also because of webpack 2 I think the whole build foldere scripts are probably changed…
So ‘how to do it properly?’ is my question.
It is recommended, but not at all required to switch to the Webpack 2 setup.
So, if you choose to use your current Webpack 1 setup, then just npm update quasar-framework to get latest and greatest package.
Otherwise, if you want to also upgrade to Webpack 2 setup (highly recommended though!), just
quasar init default <proj_name>and move your src folder in. If you changed something in /build or /config folders then it’s time to do a diff and apply those changes to the new files generated.
For me , webpack 1 was a showstopper. It just kept stalling when trying to create a prod build.
Going from 0,8 to 0.9, I created a new default project and moved my src folder and some img stuff etc into it.
I felt safer starting with a clean working project and then adding my source code.
Steps I took from there:
- global rename “<quasar” to “<q”
- global rename “</quasar” to “</q”
- activating custom style is now located in main.js
- update main.js if you have custom import packages
- update themes folder (if you have customized stuff)
- copy over your router paths into router.js
- npm install any custom packages
In my code I had to check a couple of popover components (breaking syntax)
Some stylus variables were changed and tripped my theme a bit. Easy fixes
That’s about it. Everything worked ok for me. Smooth migration.
If you are taking this route, you might want to keep the release notes at hand.
Some code syntax might have been changed that isn’t mentioned in this post.
Great answers, thanks!
@rstoenescu Probably it is my inexperience but I still do not quite get the following. When I do
quasar init default <proj_name>it starts a quasar-app version 0.0.1 . Wouldn’t it make more sense to have the latest version installed? Probably I now have to copy the package.json from the repo and replace it etc. but to me that seems like ‘extra work’.
@MusicForMellons the package.json in the setup refers to your app, not to Quasar’s. Do not copy over the package.json from the previous template or from Quasar repo! Simply npm install your additional deps and configure the version and name of your App instead.
@rstoenescu Starting to make sense now! Thanks!