You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vite 3.1 requires stripping query string from paths #51
In some cases, running a project with vite 3.1 now causes an error. E.g.
21:57:35 [vite] Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.
Plugin: vite:import-analysis
File: C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/@thisbeyond/solid-dnd/dist/source/sortable-context.jsx?v=a83c0c67
39 | return <Context.Provider value={context}>{props.children}</Context.Provider>;
40 | };
41 | const useSortableContext = () => {
| ^
42 | return useContext(Context) || null;
43 | };
at formatError (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:40782:46)
at TransformContext.error (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:40778:19)
at TransformContext.transform (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:37449:22)
at async Object.transform (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:41031:30)
at async loadAndTransform (file:///C:/Users/martin/data/identities/personal/project/solid-dnd-site/node_modules/vite/dist/node/chunks/dep-665b0112.js:37292:29)
I reported issue to vite and they responded that this needs to be fixed in vite-plugin-solid: vitejs/vite#10087 (comment)
I applied the proposed fix in a local copy of the plugin and it cleared the vite error, but then my app would fail with a console error that intermediate value was underfined for some imports. I tried a few things, but couldn't figure out how to address that, but it did seem to be related to .ts files in my solid-dnd package.
So I tried reverting back to the standard plugin and converting all my solid-dnd package to .tsx and linking that in. That then worked without error.
It seems like some bug with packages containing a mix of .ts and .tsx. But I'm stumped now on where the fix should be (in vite-plugin-solid or vite).
Activity
martinpengellyphillips commentedon Sep 13, 2022
I'll open a pr to test proposed fix.
martinpengellyphillips commentedon Sep 13, 2022
I applied the proposed fix in a local copy of the plugin and it cleared the vite error, but then my app would fail with a console error that intermediate value was underfined for some imports. I tried a few things, but couldn't figure out how to address that, but it did seem to be related to
.tsfiles in my solid-dnd package.So I tried reverting back to the standard plugin and converting all my solid-dnd package to
.tsxand linking that in. That then worked without error.It seems like some bug with packages containing a mix of
.tsand.tsx. But I'm stumped now on where the fix should be (in vite-plugin-solid or vite).Fix solidjs#51 by stripping query string from id
Merge pull request #52 from thisbeyond/51-fix-query-string-issue-in-v…