-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Implementing a build system for framework-agnostic UI components #4117
Comments
Hi, see my comment for #4115. |
See #4124 (comment) and start of standalone module @ https://github.com/pospi/svelte-universal-component-compiler |
Gee, you're not asking for much are you? Realistically, mixing frameworks together is a TERRIBLE idea, and from the sounds of it you're trying to kludge it all together which is an even worse idea. Think of it this way, just because you can take a bunch of different puzzles and force the pieces together doesn't mean it's a good idea. |
Perhaps you're misinterpreting what I'm proposing. I don't see those as particularly big asks, nor as things outside of the scope of what Svelte proposes to be. Either way I can't say the disparaging way you're approaching this discussion is particularly constructive or inclusive. I'm not planning on "mixing frameworks together" nor am I attempting to 'kludge' anything. My only proposal is wiring up a bunch of existing well-vetted modules to bind Svelte build output natively into multiple UI frameworks. Since Svelte build output is just raw JS / WebComponents and CSS, doing so with minimal dependencies can mostly be done pretty easily. In other words— the way Svelte works currently looks like this:
My proposal is to improve pluggability with the latter case by allowing more control over the generation of the
Note that this is basically the same workflow and that most of the logic happens outside of Svelte itself. The only internal differences that would affect this library are to enable more intermediary compiler targets (i.e. I can see few enhancements being necessary to Svelte itself in order to accomplish this and no need to introduce any breaking changes. In any case, easiest way to prove it is just to go ahead and implement it. There are two paths I could follow here- would really appreciate advice from @Rich-Harris and other contributors on which option best aligns with the roadmap of Svelte. Experimentation of option 1 is underway— see next post. Option 2 is making All this stated, 1 would probably get my vote at the present time. But I'm curious to hear from Svelte's creators whether they have leanings one way or the other. |
I have started work on option 1 as an exploration. Edited the original task list a bit for clarity, added checkboxes to the individual requirements & some others as test cases to check off.
|
Closing as inactive/outdated. Svelte 5 has significant changes to the runtime under the hood, and in general this issue sounds more like something on top of Svelte / not a direct feature request rather than a discussion |
I have logged this in valueflows/vf-ui#5 but am reaching out here to see if this is being attempted by anyone else. I'm unsatisfied with the provided options that increase complexity for developers integrating components into their own projects- this thread provides all necessary evidence to suggest that there is a barrier to entry present.
The user story is "As a developer, I can bring vf-ui components into my project of choice, without having to reconfigure my build system or bundler or eject from CRNA". So that means I want:
mycomponentlib
,mycomponentlib-react
,mycomponentlib-angular
etc)ReactComponent
) without runtime dependenciesI've already started working on this, but before I go too much further I want to see what other options I have. FWIW my next steps will be dealing with the output code that Svelte generates, which I don't see an API for... so expect I am going to have to do some brittle regexing to remove the CSS injection in order that the end-developer's bundler can manage it.
While I'm here I suppose it's worth asking my related pending questions in case I need to go ahead with this:
SvelteComponent
instances within React, Angular etc projects rather thanSvelteElement
ones?customElement
is defined. Can I author my own compiler targets?The text was updated successfully, but these errors were encountered: