vue-fontawesome icon indicating copy to clipboard operation
vue-fontawesome copied to clipboard

HMR not working in Vue CLI 4.5.6 with Vue 3 - Typescript

Open fevernova90 opened this issue 5 years ago • 7 comments

Describe the bug

With my current setup of creating a new project with Vue CLI, whenever I directly import FontAwesomeIcon and globally create the component in main.ts, HMR stopped working. If I use custom Vue Component, it is working just fine.

Dependencies

  1. @vue/cli 4.5.6
  2. @cue/cli-service 4.5.0
  3. typescript 3.9.3
  4. @fortawesome/fontawesome-svg-core 1.2.30
  5. @fortawesome/free-solid-svg-icons 5.14.0
  6. @fortawesome/vue-fontawesome 3.0.0-1

Expected behavior HMR reload normally after saving changes.

main.ts

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { store } from './store'

import './assets/styles/index.css'

import { library } from '@fortawesome/fontawesome-svg-core'
import { faSpinner } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

library.add(faSpinner)

const app = createApp(App)
app.use(store)
app.use(router)
app.component('fa', FontAwesomeIcon)
app.mount('#app')

Console logs

There's a weird second dev related notification of webpack in Chrome console.

image

fevernova90 avatar Sep 25 '20 14:09 fevernova90

I have the same problem. Double message, HRM only updates <style> blocks, not <template> or <script> blocks

dipasqualew avatar Oct 06 '20 16:10 dipasqualew

Same here, just import it and it breaking.

yoyoys avatar Oct 09 '20 07:10 yoyoys

Ok, just released 3.0.0-2. Please give that a go and let me know.

robmadole avatar Oct 09 '20 14:10 robmadole

Thanks @robmadole ! I'll try the new release this evening and confirm whether it solves the HMR issue.

Btw really appreciate the work you do here. Cheers!

dipasqualew avatar Oct 09 '20 14:10 dipasqualew

@robmadole I'm experiencing HMR works when adding / removing the component But HRM doesn't works when changing the props (icon, size, fixed-width, etc)

christhofer avatar Oct 12 '20 05:10 christhofer

@christhofer that's another issue that hasn't been resolved yet.

robmadole avatar Oct 19 '20 13:10 robmadole

HMR for the properties is still broken with 3.0.0-3

bobvandevijver avatar Jan 22 '21 09:01 bobvandevijver