bundling issues with solidjs #289
Open
AlemTuzlak opened this issue ·2 comments
TanStack Devtools version#
0.8.4
Framework/Library version#
/
Describe the bug and the steps to reproduce it#
Issues with SoliJS
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)#
https://github.com/escwxyz/tanstack-start-error-repro
Screenshots or Videos (Optional)#
No response
Do you intend to try to help solve this bug with your own PR?#
None
Terms & Code of Conduct#
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
I hit some client-side solidjs errors when I added the @tanstack/ai devtools with @tanstack/react-start as my framework. The devtools were working fine with just the router and query plugins.
This seems to be a valid workaround, tested in my vite config(irrelevant plugins removed from this example):
// vite.config.ts import path from "node:path"; import { devtools } from "@tanstack/devtools-vite"; import { tanstackStart } from "@tanstack/react-start/plugin/vite"; import viteReact from "@vitejs/plugin-react"; import { defineConfig } from "vite"; const config = defineConfig({ resolve: { alias: { "@": path.resolve(__dirname, "./src"), "solid-js/web": path.resolve( __dirname, "../../node_modules/solid-js/web/dist/web.js", ), }, conditions: ["import", "module", "browser", "default"], }, plugins: [ devtools(), tanstackStart(), viteReact(), ], }); export default config;Note this is in a monorepo, so the node_modules path may be different.
I'm not familiar enough with vite's plugins to know whether this could be solved within
@tanstack/devtools-viteto properly handle client vs. server bundles, but I imagine that'd be more eloquent than resolving the alias like this.
Sign in to join this conversation.
Is this related to the issues still mentioned in https://github.com/TanStack/devtools/issues/91?
The one linked above for me is limited to the Tanstack Forms devtools, so query and router active works fine.