Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fevernova90 opened this issue Sep 25, 2020 · 7 comments
Open

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

fevernova90 opened this issue Sep 25, 2020 · 7 comments

Comments

@fevernova90
Copy link

fevernova90 commented Sep 25, 2020

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

@dipasqualew
Copy link

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

@yoyoys
Copy link

yoyoys commented Oct 9, 2020

Same here, just import it and it breaking.

@robmadole
Copy link
Member

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

@dipasqualew
Copy link

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!

@christhofer
Copy link

@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)

@robmadole
Copy link
Member

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

@bobvandevijver
Copy link

HMR for the properties is still broken with 3.0.0-3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants