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

transformIndexHtml errors with "No matching HTML proxy module found" when referencing entry point as import #18228

Open
7 tasks done
ricardo-devis-agullo opened this issue Sep 29, 2024 · 1 comment
Labels
feat: html feat: ssr p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@ricardo-devis-agullo
Copy link

Describe the bug

Scaffold any SSR example from create-vite-extra and to the following changes:

Wrap the code of the client entry point in

// client-entry.js
export default function render() {
  // previous code...
}

Change the script src to manually import the function

<!-- <script type="module" src="src/client-entry.js"></script> -->
<script type="module">
import render from "./src/client-entry.js"

render();
</script>

This will fail with: "No matching HTML proxy module found from /?html-proxy&index=0.js"

There is a similar issue on #5061, but it's considered closed, so I'm not sure if this particular case is different, not supported or a bug, since the same changes work on non ssr normal examples.

Reproduction

https://stackblitz.com/edit/stackblitz-starters-7m9qws?file=index.html

Steps to reproduce

Run npm install followed by npm run dev

System Info

System:
    OS: macOS 14.6.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 691.38 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.8.0 - ~/.volta/tools/image/node/22.8.0/bin/node
    npm: 10.8.2 - ~/.volta/tools/image/node/22.8.0/bin/npm
    pnpm: 8.15.5 - ~/Library/pnpm/pnpm
    bun: 1.1.3 - ~/.bun/bin/bun
  Browsers:
    Chrome: 129.0.6668.60
    Edge: 129.0.2792.65
    Safari: 17.6

Used Package Manager

npm

Logs

No response

Validations

Copy link

stackblitz bot commented Sep 29, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@sapphi-red sapphi-red added feat: html p3-minor-bug An edge case that only affects very specific usage (priority) feat: ssr labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: html feat: ssr p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants