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

clientCache的全局共享问题 #390

Open
8 of 9 tasks
wuzequanyouzi opened this issue Apr 10, 2024 · 0 comments
Open
8 of 9 tasks

clientCache的全局共享问题 #390

wuzequanyouzi opened this issue Apr 10, 2024 · 0 comments

Comments

@wuzequanyouzi
Copy link

wuzequanyouzi commented Apr 10, 2024

Related plugins

Describe the bug

In Vite Server, when performing Vite build from the code, the build used the clientCache cache variable of the server, resulting in incorrect script content obtained. Vite build should have obtained the full script instead of obtaining hmr data. Ultimately leading to mutation errors:image

The problem occurred at wxt#538 wxt#606

Should clientCache be removed globally? Put it inside the vuePlugin method, so that the cache obtained by each vite configured vuePlugin is independent

Reproduction

https://stackblitz.com/~/github.com/wuzequanyouzi/test-returned

Steps to reproduce

  1. pnpm i
  2. set vite.config and set options.build.sourceMap to inline
  3. run node .
  4. change the content of App.vue, such as adding console. log(123) in the script. will trigger build, but will fail to build.
    image

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Memory: 1.46 GB / 15.79 GB
  Binaries:
    Node: 20.12.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.21 - ~\AppData\Local\pnpm\yarn.CMD
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.81)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @vitejs/plugin-vue: ^5.0.4 => 5.0.4 
    vite: ^5.0.0 => 5.2.8

Used Package Manager

pnpm

Logs

No response

Validations

@wuzequanyouzi wuzequanyouzi changed the title 在vite server下,从代码中进行vite build情况下,build使用了server的缓存 clientCache的全局共享问题 Apr 10, 2024
@wuzequanyouzi wuzequanyouzi reopened this Apr 10, 2024
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