Giter Club home page Giter Club logo

Comments (8)

userquin avatar userquin commented on May 31, 2024 1

@hamishjohnson should be fixed in v0.2.2: server/*.* included in globIgnores if not configured.

from sveltekit.

userquin avatar userquin commented on May 31, 2024

@hamishjohnson if you're using precaching you need 1 route as fallback, by default is the entry point: you need to prerender 1 route

from sveltekit.

userquin avatar userquin commented on May 31, 2024

it seems kit 1.5.0 has some problems with SSR builds, if you check the sw it includes server assets... can you try updating to latest version?

Tried with adapter node and same result...

from sveltekit.

hamishjohnson avatar hamishjohnson commented on May 31, 2024

Yeah I tried it with prerendering the root page in +page.ts.

And I just tried in both 1.16.3 and 1.14 but I'm experiencing the same problem. In each version when running build the server files get included which also confused me but that seems to have always been the case as seen here sveltejs/kit#9161

from sveltekit.

userquin avatar userquin commented on May 31, 2024

@hamishjohnson you can solve server assets including globIgnores:

      workbox: {
        globPatterns: ["client/**/*.{js,css,html,ico,png,svg}"],
        globIgnores: ["server/*.*"] // <== to remove server entries from sw precache manifest
      },

Since you're using auto adapter, there is no way to copy prerendered/pages/index.html to the output folder: you must copy it manually, the navigateFallback is properly added to sw precache manifest (just check .sveltekit/output/client/ folder).

Using node adapter also works, the output folder will be build, but same problem with prerendered page.

from sveltekit.

userquin avatar userquin commented on May 31, 2024

uhmm, node adapter should work, I'll test it later:

imagen

from sveltekit.

userquin avatar userquin commented on May 31, 2024

it works, running yarn preview after changing to node adapter and building the app:

imagen

from sveltekit.

hamishjohnson avatar hamishjohnson commented on May 31, 2024

Ah :) The glob ignore worked for me, so I didn't try the Node Adapter, though I did try that before. Thanks for your help! I guess it should be documented.

from sveltekit.

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.