-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
How to use with sapper #29
Comments
I don't think you need style-loader if you use mini CSS extractor. Maybe that will make it Sapper compatible. |
I too would be interested to see how this might integrate in to the sapper development/build process. I feel sapper would be the typical path for most adopting svelte and there is no doubt that those folks would gravitate to this component library. I'll attempt to integrate into a clean sapper (from Webpack template) project and post issues here as they arise - hopefully we can resolve with relative ease. btw - excellent job Hunter! |
I've already tried not using style-loader and the page is only styled after its first render (it doesnt get included on the serve) |
I was able to merge the webpack template in to the sapper generated config and implement card, button etc. I did not run in to the the issue reported about the first render (at least not in development mode). But I did run in to issues with some of the subcomponents - such as Row within TopAppBar - throwing an error;
|
Hi, For SSR you probably need a better processing in ther server part of the app; smui MUST be a dev dep (according to sapper doc) or you could do the dynamic import trick but that's not very fun day to day You'll need to install whatever dependency webpack complains about along the way Webpack :
|
It works fine for me |
The configuration provided by @mwamp it does work, first doing:
And creating
|
I think I know what's going on. Some components use the |
Yes, that was it. It'll take a little bit for me to update all the ClassAdder components with support for SSR, so hold tight. |
Ok, I've released a new version, which should fully support SSR and Sapper. Let me know if there are any more bugs. :) |
Well done. Looking forward to giving it a try. |
@hperrin Me and a few friends made a little challenge of making a paint -like program in one week, so i wanted to use this. For this challenge I ended up using regular mui classes for some components and smui for others + wrapping a few things with |
@mateiadrielrafael why did you need to use some regular mui classes? |
Is there any steps to add to a sapper degit generated project? I tried to use the vanilla material here but wasn't having luck: https://github.com/QuantumInformation/material-svelte-blueprint |
May I ask for the configuration for sapper with rollup? |
@kafai97 - there's an example rollup config on #36 (comment) |
There's also an example repo with a sapper/rollup setup linked in the readme. |
What is deprecated? Can elaborate better and/or cite any sources about it? |
I have seen But you are right, I could not finde any article / issue about that. Maybe i was a bit to fast in writing this. I edited my answer above! |
Here is a sapper template with rollup, which follows the config on that (comment) |
Hello, Maybe it relates with this issue: #66 Thank you very much for clarification, |
Hey guys, any of the non valid SSR components, you can pull in using svelte-loadable to dynamically load the component. This is how I load up Vime-Svelte, which is not SSR compatible.
And then...
And in the usage...
It's a bit more work, but I'm sure it will work fine with these components as well, testing and reporting as soon as I implement these webpack changes to make my SMUI work. |
I've tried to include the sass related rules / plugins (from the site folder) both in the client and server configs but it fails because style-loader tries to access the document object on the server. I think it'll be very helpful if you included a webpack config compatible with sapper.
Sorry if this request is a little bit stupid, i'm just really tired after trying to do it myself for a few days...
The text was updated successfully, but these errors were encountered: