Vue-cli: Hot reloading is slow

Created on 13 Dec 2019  ·  10Comments  ·  Source: vuejs/vue-cli

Version

4.1.1

Environment info

Environment Info:

  System:
    OS: macOS 10.15.1
    CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
  Binaries:
    Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
    Yarn: 1.19.1 - ~/.nvm/versions/node/v8.12.0/bin/yarn
    npm: 6.12.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
  Browsers:
    Chrome: 78.0.3904.108
    Firefox: Not Found
    Safari: 13.0.3
  npmPackages:
    @fortawesome/vue-fontawesome: ^0.1.8 => 0.1.8 
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.1.2 
    @vue/babel-preset-app:  4.1.1 
    @vue/babel-preset-jsx:  1.1.2 
    @vue/babel-sugar-functional-vue:  1.1.2 
    @vue/babel-sugar-inject-h:  1.1.2 
    @vue/babel-sugar-v-model:  1.1.2 
    @vue/babel-sugar-v-on:  1.1.2 
    @vue/cli-overlay:  4.1.1 
    @vue/cli-plugin-babel: ^4.1.1 => 4.1.1 
    @vue/cli-plugin-eslint: ^4.1.1 => 4.1.1 
    @vue/cli-plugin-router: ^4.1.1 => 4.1.1 
    @vue/cli-plugin-vuex: ^4.1.1 => 4.1.1 
    @vue/cli-service: ^4.1.1 => 4.1.1 
    @vue/cli-shared-utils:  4.1.1 
    @vue/component-compiler-utils:  3.1.0 (3.0.1)
    @vue/preload-webpack-plugin:  1.1.1 
    @vue/web-component-wrapper:  1.2.0 
    bootstrap-vue: ^2.1.0 => 2.1.0 
    eslint-plugin-vue: ^5.0.0 => 5.2.3 
    portal-vue:  2.1.6 
    vue: ^2.6.10 => 2.6.10 
    vue-cli-webpack:  1.0.0 
    vue-eslint-parser:  5.0.0 
    vue-functional-data-merge:  3.1.0 
    vue-hot-reload-api:  2.3.4 
    vue-loader:  undefined (15.7.2)
    vue-moment: ^4.0.0 => 4.0.0 
    vue-router: ^3.1.3 => 3.1.3 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.10 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
    vuex: ^3.1.2 => 3.1.2 
    vuex-persist: ^2.2.0 => 2.2.0 
    vuex-router-sync: ^5.0.0 => 5.0.0 
  npmGlobalPackages:
    @vue/cli: 4.1.1

Steps to reproduce

yarn serve
making changes
wait the hot reload works

What is expected?

the hot-reload should be working perfectly

What is actually happening?

The yarn serve is to slow to compile before to run yarn build if ran yarn build and after yarn serve ts fast


it was working perfectly before I don't know what is happening

Most helpful comment

Sorry it's not really clear @rrodriguez-consulting, do you mean clear the npm/yarn cacheor the node_modules cache? (or both)

All 10 comments

I am experiencing this as well.

Adding fontawesome to the project adds 30 to 90 seconds to the hot-reload build time for me.
The fontawesome docs
have some explanation, but the deep imports don't seem to help, and it looks like terser has collapse_vars set to false.

Also worth noting, I am running in a container, on Docker Desktop (windows). This SO question suggests running on the native OS will avoid the problem, though I haven't tried that.

Hi I have to delete the cache it is fast now

Raul

On Wed 18 Dec 2019 at 11:33 Mike Shantz notifications@github.com wrote:

I am experiencing this as well.

Adding fontawesome to the project adds 30 to 90 seconds to the hot-reload
build time for me.
The fontawesome docs
https://fontawesome.com/how-to-use/with-the-api/other/tree-shaking
have some explanation, but the deep imports don't seem to help, and it
looks like terser has collapse_vars set to false.

Also worth noting, I am running in a container, on Docker Desktop
(windows). This SO question
https://stackoverflow.com/questions/58623038/very-slow-hot-reloading-after-font-awesome-has-been-added-to-vue-js-as-a-compone
suggests running on the native OS will avoid the problem, though I haven't
tried that.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/vuejs/vue-cli/issues/4956?email_source=notifications&email_token=ABXLEYOYGRDW7SHYOYFRZ4LQZJUJNA5CNFSM4J2GSFDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHHBXEA#issuecomment-567155600,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABXLEYKUBA564OQV4DF43X3QZJUJNANCNFSM4J2GSFDA
.

Clearing the cache works for me as well.

Amazing I believe this an issue with webpack

El mié., 18 dic. 2019 a las 11:54, Mike Shantz (notifications@github.com)
escribió:

Clearing the cache works for me as well.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/vuejs/vue-cli/issues/4956?email_source=notifications&email_token=ABXLEYJRLUEBEKTCT2IMQU3QZJWYBA5CNFSM4J2GSFDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHHDUXY#issuecomment-567163487,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABXLEYJEII7XQB2E2LVDEJTQZJWYBANCNFSM4J2GSFDA
.

Hi @rrodriguez-consulting cache of what? Npm/Yarn?

@meshantz @rrodriguez-consulting do you mean clear the npm/yarn cache or project node_modules cache?

Sorry it's not really clear @rrodriguez-consulting, do you mean clear the npm/yarn cacheor the node_modules cache? (or both)

Also confused by this. The time to serve is very slow for me too

+1

Was this page helpful?
0 / 5 - 0 ratings