Giter VIP home page Giter VIP logo

Comments (9)

PatrickJS avatar PatrickJS commented on June 10, 2024

where are you deploying qwik to?

from qwik.

PatrickJS avatar PatrickJS commented on June 10, 2024

looks like google cloud run if you deploy all built files in /build into the same bucket location behind a cdn then this will also fix the problem. in the ssr.entry you can set base to that bucket url

so

base: "https://my-cdn.com/my-path-to-bucket/build/"

from qwik.

intellix avatar intellix commented on June 10, 2024

not quite sure I'm understanding you :) Everything works as expected, files do exist and are pulled correctly. Our problem (and probably everyone's problem) is that if you make a request for a non-existing JS file (maybe due to caching) that it delivers the 300kb custom JS file instead of a few bytes:

The ethos of qwik is that everything is fast and optimised out of the box and developers don't accidentally fall into performance pitfalls, so delivering your custom 300kb 404 page and causing 30mb of wasteful requests is something that developers have to understand and manually fix.

from qwik.

PatrickJS avatar PatrickJS commented on June 10, 2024

ok the solution was setting cloudflare (that is in front of cloud-run) anything with /build to be cache forever

from qwik.

wmertens avatar wmertens commented on June 10, 2024

@PatrickJS although it wouldn't hurt to have the static file serving for the assets base serve simple 404s

from qwik.

PatrickJS avatar PatrickJS commented on June 10, 2024

yup I agree

from qwik.

PatrickJS avatar PatrickJS commented on June 10, 2024

I have a draft PR here if anyone wants to take over the PR.

Basically remake it and check that everything works. Possible add a test
#6307

from qwik.

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.