sapper Questions

3

Solved

I am trying to figure it how to debug the server side to do some modifications to the default sapper template, I followed the instructions to debug the server side from the docs, and the ndb opens ...
Burt asked 2/12, 2019 at 17:31

3

Solved

This is more of a service worker question, although it could be more specific to Sapper. I really don't know, as I am the first to admin I struggle with Service Workers, have barely used them, and ...
Thusly asked 10/2, 2020 at 17:59

2

Solved

Our company produces an automation framework that is written in svelte/sapper. One feature is that developers can create custom ui widgets, currently using plain js/html/css and our client side api...
Wolfy asked 28/12, 2020 at 20:59

1

I need to set up a Polka (or Express) server so that it can serve multiple applications (one per hostname) from a single server.js entry point. It can be done using the vhost middleware (https://gi...
Deadman asked 9/12, 2020 at 10:21

1

Solved

I am trying to load sv-bootstrap-dropdown module in nav.svelte component but I am getting the error <Dropdown> is not a valid SSR component. You may need to review your build config to ensure...
Lacroix asked 22/11, 2020 at 17:43

2

Solved

I've got a component in the sapper template with pagination. Currently all links are behaving as though they're relative to root (localhost:3000/ in this case) regardless of whether the href is in ...
Protoxylem asked 3/7, 2019 at 5:11

2

I've just recently started using svelte and sapper, and I'm trying to persist a stored session even when a user refreshes the page. (I hope this can be done). The idea is that a user can sign in, a...
Prosopopoeia asked 18/10, 2020 at 11:26

4

My question is very simple. How do you prevent, e.g. non authorized user, to enter specific routes in sapper? user.svelte <script> import { onMount } from 'svelte'; onMount(() => { i...
Fulllength asked 29/9, 2019 at 7:59

1

Solved

In Sapper I am trying to import a component only if being rendered client side (using onMount). Is there something similar to React Suspense and React.lazy? Or is there another approach?
Incentive asked 12/9, 2020 at 10:54

1

I am trying to implement in Sapper what is done in the next.js example called with-route-as-modal. What it does is that when clicking on a link, the new page is shown in a modal instead of replaci...
Guttate asked 13/4, 2020 at 9:39

2

Solved

When i'm trying to change data dynamically of the each loop variable is not refreshing the DOM elements. How I can redraw the each loop values <script> // default messages object let messag...
Jeffryjeffy asked 12/8, 2020 at 7:45

2

I'm trying to create a login form using sapper, but am encountering the following problem when trying to test a basic POST fetch. In routes/login/login.svelte, I have the following code which is ca...
Snout asked 16/7, 2020 at 14:9

1

Learning how to use Sapper. I have a component with form (the form has one field to enter an email address) and use fetch to post the data to the serverhandle. When I post the data and try to log t...
Docile asked 27/9, 2019 at 3:50

1

Solved

We are having a problem where on click is adding a class to a div but the classes CSS doesn't get add to the div. It just adds the class. <script> function handleClick() { document.getEleme...
Throttle asked 2/7, 2020 at 14:16

3

With the following code: <svelte:head> <script type='application/ld+json'> { "@context": "https://schema.org", "@type": "Organization", "url": "https://filestar.com", "logo": "ht...
Roily asked 10/11, 2019 at 10:33

0

I am trying to get the Winston logging library working with my Sapper app. That Sapper app uses Rollup as module bundler. To implement my app, I basically followed the following steps: Start new S...
Operculum asked 31/5, 2020 at 14:29

2

Solved

I used passportjs in the past with expressjs and currently I'm trying to incorporate it with Sapper app but I'm unable to figure out how to inlcude the passport.authenticate() in my route because i...
Shammy asked 25/10, 2019 at 13:37

4

Solved

In my sapper app, I have some data stored in a json file at src/data/videoslist.json, an array of objects in json format. I need to retrive the data in my index page to pass it to the component. H...
Afterburner asked 17/5, 2020 at 16:3

2

Solved

I need to redirect users to login page if they are not authenticated. I need something like route.beforeEach in Vue.js, ideally: sapper.beforeRouteChange((to, from, next) => { const isAuth = ...
Bernadettebernadina asked 4/11, 2019 at 10:15

1

Solved

In Svelte you can pass props to the content in a slot. <Component let:message="Hello!"> <div> {message} </div> </Component> When Sapper uses a layout to render a route...
Road asked 29/3, 2020 at 7:8

2

Solved

I'm using sapper and stripejs. After installing stripejs using the command "npm install stripe --save" and followed the npm instruction to use the package: import Stripe from 'stripe'; const str...
Saith asked 24/1, 2020 at 16:1

1

I wrote a Sapper app with session management following the RealWorld example: polka() .use(bodyParser.json()) .use(session({ name: 'kidways-app', secret: 'conduit', resave: false, saveUninit...
Tanaka asked 22/2, 2020 at 19:18

1

Solved

Say I have a blog route that loads a complete array of all blog posts. The individual blog posts live at blog/[postId]. Is there a Sapper-idiomatic way to pass the data for the individual post from...
Sharolynsharon asked 13/2, 2020 at 5:58

1

Solved

I am using svelte/sapper with express. I have an api in routes/billing/index.js It needs to fetch data from customers/[customernumber]/detections.js My question is how to fetch data from inter...
Golter asked 7/2, 2020 at 17:39

1

Solved

I'm working on a Sapper project and I'd like to load in some async data into the layout before loading in the slots. I've found that within a _layout.svelte file, I'm unable to pass props to the sl...
Apache asked 5/1, 2020 at 19:23

© 2022 - 2024 — McMap. All rights reserved.