Erik Demaine
Erik Demaine
SSolidJS
Created by Erik Demaine on 4/7/2024 in #support
Dependency configuration in Astro
I'm trying to add solid-bootstrap as a dependency in an Astro + Solid project. This results in the solid export flag being turned on, so solid-bootstrap exports dist/esm/index.jsx by default. Then I get the error Could not import ./Accordion, I guess because .jsx isn't getting resolved as a default extension. I feel like this is probably standard... Is there some Vite configuration I should add? I tried
vite: {
optimizeDeps: {include: 'solid-bootstrap'},
ssr: {noExternal: ['solid-bootstrap']},
},
vite: {
optimizeDeps: {include: 'solid-bootstrap'},
ssr: {noExternal: ['solid-bootstrap']},
},
(and also optimizeDeps.exclude) but didn't see any difference. Alternatively, is solid-bootstrap doing something wrong? I thought it worked with SSR... But maybe not Astro?
23 replies