resting icon indicating copy to clipboard operation
resting copied to clipboard

Bump Vue version

Open mirkoperillo opened this issue 2 years ago • 5 comments

Currently Resting uses Vue.js 2.6.

The final goal is moving to last new stable version of Vue (3.x). Understand what's side-effect and blocking steps of bumping from current version to new one

mirkoperillo avatar Jul 05 '23 15:07 mirkoperillo

@nikhilraojl could you be interested in this issue ?

mirkoperillo avatar Jul 05 '23 15:07 mirkoperillo

@mirkoperillo Sure, I will have a go this weekend. Are there any UI elements currently implemented in vue in the current version of the extension?

nikhilraojl avatar Jul 06 '23 05:07 nikhilraojl

Yes absolutely. You can find them in src/js/app/components.

A screenshot to give a visual idea where the Vue components are in the UI

Resting - the REST client — Firefox Developer Edition_001

The idea is bumping Vue contained in src/js/vendor to the last stable version and understand if everything continues to work or if there are problems.

I am available for more details or suggestions

mirkoperillo avatar Jul 06 '23 08:07 mirkoperillo

@mirkoperillo It seems we can't just use the existing way i.e

  • bump the vue version to 3.3.4 in package.json
  • build the vue components into umd format through build script
  • import built vue umd components and vue runtime (vue.runtime.global.prod) through requirejs in app.js
  • mount the component

I tried the above with no luck. In vue3 we have to have Vue as global variable for library components and we have to use the new Vue.createApp({}) constructor to create compnents instead of new Vue({}). I have updated both but wasn't able to make it work and always got errors

It seems vue3 and requirejs don't mix well which I am guessing is the issue stackoverflow question

P.S Sorry for the delay was stuck up with some work

nikhilraojl avatar Aug 17 '23 13:08 nikhilraojl

It seems vue3 and requirejs don't mix well which I am guessing is the issue stackoverflow question

Interesting, so it is not a smooth replacement. I need to investigate about this.

P.S Sorry for the delay was stuck up with some work

Don't worry. I appreciate every time you dedicate to Resting. Thank you for your initial investigation. It has been useful to understand how to move forward with the roadmap for the project (More details in these notes on my blog)

mirkoperillo avatar Aug 18 '23 08:08 mirkoperillo