Closed benmccann closed 3 years ago
@benmccann I would love to see this be supported by SvelteKit!
I was wondering, is there anything Carbon-specific about it?
Definitely nothing Carbon-specific, but as @dominikg alluded to, a generic approach would probably require some runtime logic.
This preprocessor creates and consumes a pre-built file that maps the Carbon component to the actual source path.
I'm going to close this since a feature has been added to vite-plugin-svelte
that removes the need for it: https://github.com/sveltejs/vite-plugin-svelte/pull/200
If that feature doesn't work out as a solution, maybe I'll be back here :smile:
I ran into the same problem this preprocessor is solving in another library and was just pointed here. Wow. This is a pretty ingenious solution! I couldn't come up with any answer I liked myself
I think it could be recommended for all projects in the SvelteKit FAQ. Possibly it could even be included in SvelteKit by default until / unless another solution is built in
I was wondering, is there anything Carbon-specific about it? Maybe it could be called something more general like
carbon-design-system/fast-imports-preprocessor
?