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

modify dumped code doesn't work as expected for some file #2126

Closed
6 tasks done
await-ovo opened this issue Oct 8, 2022 · 0 comments · Fixed by #2127
Closed
6 tasks done

modify dumped code doesn't work as expected for some file #2126

await-ovo opened this issue Oct 8, 2022 · 0 comments · Fixed by #2127

Comments

@await-ovo
Copy link
Contributor

Describe the bug

after change dumped code in .vite-node/dump, and re-run vite-node, you can see that some file changes take effect and some do not.

Reproduction

Here is a repo to reproduce: https://github.com/await-ovo/reproduce-vite-node-load-dumpped-modules-issue

steps to reproduce:

Steps to Reproduce

  1. git clone git@github.com:await-ovo/reproduce-vite-node-load-dumpped-modules-issue.git
  2. cd reproduce-vite-node-load-dumpped-modules-issue
  3. pnpm install
  4. node ./index.mjs
  5. modify dumpped code in .vite-node/dump/_@fs_xxxxx_reproduce-vite-node-load-dumpped-modules-issue_src_index_tsx--xxxxx.js:

change-src/index.tsx

  1. modify dumpped code in .vite-node/dump/_src_App_tsx--xxxx.js:

change-src/App.tsx

  1. node ./index.mjs then you can see that only the change of .vite-node/dump/_src_App_tsx--xxxx.js take effect:

dump-result

System Info

System:
    OS: macOS 11.6.8
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 2.21 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
    Yarn: 1.22.19 - ~/Library/pnpm/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
  Browsers:
    Chrome: 105.0.5195.125
    Safari: 15.6.1
  npmPackages:
    vite: ^3.1.4 => 3.1.0
    vitest: workspace:* => 0.24.0

Used Package Manager

pnpm

Validations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant