Skip to content
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

Unable to use with Sapper #34

Open
gleuch opened this issue Oct 10, 2020 · 3 comments
Open

Unable to use with Sapper #34

gleuch opened this issue Oct 10, 2020 · 3 comments
Assignees
Labels

Comments

@gleuch
Copy link

gleuch commented Oct 10, 2020

When attempting to use with Sapper, the following error is generated:

<Facebook> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules

Sapper requires the original component source in order to build for server-side rendering.
See here: https://github.com/sveltejs/sapper-template#using-external-components

The current build structure for this package does not allow accessing the original component source. E.g. it does not work if installed as a dependency nor devDependency.

You may want to support Sapper-friendly exports to the uncompiled icon .svelte files within the package.

@gleuch
Copy link
Author

gleuch commented Oct 10, 2020

A current workaround is to install directly from Github:

yarn add --dev https://github.com/icons-pack/svelte-simple-icons.git#v1.9.1

And then reference individual Svelte files:

<script>
  import Facebook from '@icons-pack/svelte-simple-icons/src/components/Facebook.svelte';
</script>

<Facebook size={60} />

@wootsbot
Copy link
Member

wootsbot commented Oct 16, 2020

@gleuch Thanks for the issue, I think we can fix it easily by making all the components available.

feel free to contribute...

@wootsbot wootsbot pinned this issue Oct 16, 2020
@wootsbot wootsbot self-assigned this Nov 13, 2020
@wootsbot wootsbot unpinned this issue Mar 14, 2023
@wootsbot wootsbot pinned this issue Mar 14, 2023
@wootsbot
Copy link
Member

wootsbot commented Oct 31, 2023

I am performing a refactor that solves the issue.

live: https://github.com/icons-pack/svelte-simple-icons/releases/tag/v4.0.0-rc.2

@wootsbot wootsbot unpinned this issue Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants