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 is extremely slow if typescript file has a import statement of vue #350

Open
8 of 9 tasks
ahas opened this issue Jan 29, 2024 · 0 comments
Open
8 of 9 tasks

HMR is extremely slow if typescript file has a import statement of vue #350

ahas opened this issue Jan 29, 2024 · 0 comments

Comments

@ahas
Copy link

ahas commented Jan 29, 2024

Related plugins

Describe the bug

HMR is extremely slow when I use the defineProps function with typescript by importing from the ouside of component.
and the imported typescript file has the import statement of 'vue' (or other libraries in node_modules).

I guess that issue is coming from isEqualAst function.

Getting deep comparison for AST requires high costs. I think there is no need to check node_modules.

Reproduction

https://stackblitz.com/edit/nuxt-starter-npmbmm?file=app.vue

Steps to reproduce

import props interface from other typescript file in your custom component.
then import vue or any huge library.

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (16) x64 Intel(R) Core(TM) i9-9900KF CPU @ 3.60GHz
    Memory: 24.59 GB / 31.35 GB
    Container: Yes
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.17.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.6.7 - /usr/local/bin/npm
    pnpm: 8.15.0 - /mnt/c/Program Files/nodejs/pnpm
    bun: 1.0.25 - ~/.bun/bin/bun

Used Package Manager

npm

Logs

No response

Validations

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

No branches or pull requests

1 participant