w3champions / website

The webpage for the www.w3champions.com community project.
49 stars 57 forks source link

Switch to `vite` #577

Closed Rotzbua closed 6 months ago

Rotzbua commented 1 year ago

vue-cli is in maintenance mode. https://github.com/vuejs/vue-cli#%EF%B8%8F-status

The new default build system is vite. It is faster and offers a simpler build process.

I have a working first draft. PR coming soon.

update: It seems that your app have with some components an event emit and scope problem. Not sure where this comes from.

gustav87 commented 1 year ago

Hey Rotzbua, do you have an example of an event emit and scope problem? I'm not exactly sure what you mean.

Rotzbua commented 1 year ago

Click on profile button and nothing happens. The browser console logs following error:


[Vue warn]: Error in v-on handler: "TypeError: this is null"

found in

---> <VBtn> at website/src/App.vue
       <VAppBar> at website/src/App.vue
         <VApp> at website/src/App.vue
           <App> at website/src/App.vue

TypeError: this is null
    loginOrGoToProfile App.vue:220
    VueJS 4
    click VBtn.ts:163
    VueJS 63
    <anonymous> main.ts:60
    VueJS 7
    click VBtn.ts:163
    VueJS 63
    <anonym> main.ts:60
gustav87 commented 1 year ago

I checked this out and this is null in that context for some reason. Making loginorGoToprofile an arrow function "solves" it, but there's evidently some larger issue at play. I played around with it for a while but it just gave me a headache! Is it better to switch to Vite at the same time as Vue 3? Perhaps using Vite and Vue2 is difficult.

Rotzbua commented 1 year ago

I agree with you that the change should be later. Maybe a dependency is the reason for the problem or some bug in the code. I would not pursue this further at this time, but leave the issue open to gather more information.

gustav87 commented 6 months ago

Completed in https://github.com/w3champions/website/pull/734.