Goulven
Goulven
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
You can do it with WebComponents, but it was complex enough that using a framework should have help.
24 replies
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
I'll give it a try, thanks!
24 replies
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
(Sorry if it was confusing)
24 replies
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
(I said lib because I was thinking as a "NPM lib" not a "SolidJS lib")
24 replies
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
Yeah, you can say that. But it doesn't change much about my problem, I still need to output an "App" (my component) as a js files that can be add to any website. Even not at compile time, and even if this website don't use SolidJS.
24 replies
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
My goal is to build a component that I can publish on NPM, so my users can easily import it into their website. I can't asume that they will use it at compile time (they could just put it in a <script> tag) not that they use Solid themself.
24 replies
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
Vite devs don't recommend to use Vite for building libs. And anyway, I still thinks this should be documented and/or bundler-agnostic. If it's not the scope of SolidJS I can understand, but I'll have to come back to Preact.
24 replies
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
As I said in my first message :
I tried rollup-preset-solid but it's not updated anymore and it don't work. (the result use external import like [...] from 'solid-js/web';)
24 replies
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
I tried to create my own configuration from this starter example. However, I was not able to translate the tsup/esbuild configs from this repo into a working rollup config... but I will continue my attempts.
24 replies
SSolidJS
Created by Goulven on 4/23/2024 in #support
How do I build my component?
Hum, thanks @REEEEE @jer3m01 , I'll look into that. But I have to admit that it surprise me a little bit that I have to take a look at librairies's complex repository from others orgs, that use different bundlers than me... Just for something as simple as building for the web? For comparison, here is the procedure on Preact, which I used before switching to SolidJS: my-app/tsconfig.json
{
"compilerOptions": {
"skipLibCheck": true,
"module": "NodeNext",
"jsx": "react-jsx",
"jsxImportSource": "preact",
}
}
{
"compilerOptions": {
"skipLibCheck": true,
"module": "NodeNext",
"jsx": "react-jsx",
"jsxImportSource": "preact",
}
}
And then run tsc for TypeScript to compile. Even though the process is not as straightforward on SolidJS, I think it still deserves to be bundler-agnostic and to be documented somewhere...
24 replies