Giter Club home page Giter Club logo

Comments (7)

developit avatar developit commented on May 21, 2024 1

preact build --no-prerender will fix this in the interim. We need to shim in a binary data loader for the prerenderer, should be pretty simple to do.

from preact-cli.

rkostrzewski avatar rkostrzewski commented on May 21, 2024

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).

from preact-cli.

thangngoc89 avatar thangngoc89 commented on May 21, 2024

@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)

from preact-cli.

developit avatar developit commented on May 21, 2024

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.

from preact-cli.

SaraVieira avatar SaraVieira commented on May 21, 2024

@rkostrzewski this can be closed right ?

from preact-cli.

reznord avatar reznord commented on May 21, 2024

I don't think this is fixed.

from preact-cli.

thangngoc89 avatar thangngoc89 commented on May 21, 2024

This is fixed by switching to prerender using Webpack.

from preact-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.