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

Web viewer fails to build with vite during dev #6815

Open
jprochazk opened this issue Jul 8, 2024 · 0 comments
Open

Web viewer fails to build with vite during dev #6815

jprochazk opened this issue Jul 8, 2024 · 0 comments
Labels
🪳 bug Something isn't working 🕸️ web regarding running the viewer in a browser

Comments

@jprochazk
Copy link
Member

jprochazk commented Jul 8, 2024

vite does not properly copy the .wasm file when the @rerun-io/web-viewer dependency is optimized:

This results in web viewer being unable to load the .wasm file at runtime during vite dev.

The workaround is to disable optimization for the package:

return defineConfig({
  optimizeDeps: {
    exclude:
      process.env.NODE_ENV === "production" ? [] : ["@rerun-io/web-viewer"],
  },
});

vite build works fine, because the .wasm file is properly copied into dist

@jprochazk jprochazk added 🪳 bug Something isn't working 🕸️ web regarding running the viewer in a browser labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

No branches or pull requests

1 participant