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
Error when require a PNG image #39
Comments
|
IMHO the best idea would be to use webpack to create a bundle exporting (library target?) root component which would be processed by preact's string renderer. This way all glorious webpack loaders are preserved (e.g. url loaders, image size optimization etc). |
@rkostrzewski this is how we are doing it in Phenomic . To be fair, this is a very complicated thing to do and there are many important bugs than this. So I suggest that in the mean time, just tell user to avoid webpack specific loader (just like Next.js did) |
I've been thinking we might have to do the webpack-on-the-server route. It's not the worst thing, the current loader injection stuff I had to add to get basic apps working under Node directly is pretty gross. I've seen people use UMD for both their web bundle and their Node import for SSR - think that'd work? Not sure if it would bloat the bundle size at all. |
@rkostrzewski this can be closed right ? |
I don't think this is fixed. |
This is fixed by switching to prerender using Webpack. |
This only happens on build step, it doesn't happen on dev mode. I guests it's node/webpack environment
Stack trace:
The text was updated successfully, but these errors were encountered: