Cweili / svelte-fa

Tiny FontAwesome component for Svelte
https://cweili.github.io/svelte-fa/
MIT License
398 stars 24 forks source link

Using source svelte files when building docs #312

Closed marekdedic closed 7 months ago

marekdedic commented 9 months ago

Closes #311

I tried just uncommenting the <script> tag and copying over the bundle, but that triggers some svelte error and you should use svelte source files anyway...

Cweili commented 9 months ago

The reason why I use the published version in the documentation is that I want to test whether the built version can be properly imported and used in the project. Is it possible to import svelte-fa in a monorepo-like way?

marekdedic commented 9 months ago

Is it possible to import svelte-fa in a monorepo-like way?

It would be, but it would be much more complicated unfortunately, at least as far as my understanding of it goes - because when you are actually using it, rollup reads the package.json of svelte-fa and uses the source svelte files... So doing it in a monorepo fashion would probably mean really separating the docs and the lib into 2 packages with their own package.json and so on...

Cweili commented 9 months ago

Or perhaps we can also try to provide a "development" mode and a "product" mode for documentation

marekdedic commented 9 months ago

That would actually be great, but given how it's imported in totally different ways, I don't see how to do that (but I have almost no experience with rollup and svelte bundling in general...)

Cweili commented 7 months ago

Solved by https://github.com/Cweili/svelte-fa/pull/315 . Thanks!