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

htmlInlineProxyPlugin will broken with build watch and inline module script #6372

Closed
7 tasks done
ZxBing0066 opened this issue Jan 4, 2022 · 0 comments · Fixed by #6373
Closed
7 tasks done

htmlInlineProxyPlugin will broken with build watch and inline module script #6372

ZxBing0066 opened this issue Jan 4, 2022 · 0 comments · Fixed by #6373

Comments

@ZxBing0066
Copy link
Contributor

Describe the bug

When we use vite build -w, with some inline module script, all build will crash when some file changed.

For reproduction:
Go to https://codesandbox.io/s/loving-satoshi-or8v6?file=/src/App.tsx , click server control panel => restart server.
Then open App.tsx and just change some code in the file, then some error log will print on the right bottom Terminal panel.

build started...
✓ 27 modules transformed.
[vite:html-inline-script-proxy] Could not load /sandbox/index.html?html-proxy&index=0.js (imported by index.html): Cannot read property '0' of undefined

Reproduction

https://codesandbox.io/s/loving-satoshi-or8v6?file=/src/App.tsx

System Info

System:
    OS: macOS 11.2.3
    CPU: (8) x64 Apple M1
    Memory: 148.04 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.22.1 - /Users/ZxBing0066/.nvm/versions/node/v12.22.1/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.12 - /Users/ZxBing0066/.nvm/versions/node/v12.22.1/bin/npm
  Browsers:
    Chrome: 96.0.4664.110
    Firefox: 95.0.2
    Safari: 14.0.3
  npmPackages:
    @vitejs/plugin-react: ^1.0.7 => 1.1.3 
    vite: ^2.7.2 => 2.7.9

Used Package Manager

yarn

Logs

[vite:html-inline-proxy] Could not load /Users/zxbing0066/Workspace/contribute/vite-demo/index.html?html-proxy&index=0.js (imported by index.html): Cannot read property '0' of undefined

Validations

@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant