sapper Questions
4
Solved
I'm currently trying to redirect the user to a new page when they clicked on a href link.
The problem is that the url does change per se, but only when I manually hit "reload", the page a...
3
Solved
I am writing a Server Side Rendered app with Svelte/Sapper and I am having trouble using Font Awesome fonts.
I am using the following to load the font:
<script>
import Icon from "svelte-aw...
Arrowood asked 30/5, 2020 at 3:36
3
Solved
Let's say I have a /foo route. But sometimes people hit /foo with a language parameter: /fr/foo. And other times they might hit it with a language and a country: /ca/fr/foo
So I need a routing ta...
4
Solved
I'm trying in the <script> to manually document.createElement and then to appendChild an audio every time an eventListener is called to replace it. Everything works fine in the browser, apart...
2
What I'm trying to achieve
I'm trying to create a svelte component (using TypeScript), create a type, export it and import it into another file.
Options.svelte => svelte component that also exp...
Heddie asked 27/11, 2020 at 20:15
3
Solved
I'm new in Svelte and I'm trying to set some info into sessionStorage but it is throwing "sessionStorage is not defined".
I realised that I received this error because it's running on the server si...
4
Essentially I'm working on a slideshow project where each "slide" is loaded dynamically using <svelte:component this={currentSelection.component} />. Each slide requires custom in and out tra...
Boysenberry asked 26/1, 2020 at 14:50
3
Currently, I'm working on a project which shares a Menu component across all pages except two pages. I added the menu component inside root _layout.svelte file. Now since two pages that don't need ...
Cryobiology asked 3/11, 2019 at 8:9
5
I have been trying to load the ace editor (https://ace.c9.io/) into my Sapper application. I had success loading it in the script tag when I loaded it in a Sapper route, but when I am trying to do ...
Mammilla asked 7/1, 2020 at 14:2
1
This issue showed up after trying to install Mongoose on my sapper project
util.js:157
throw new ERR_INVALID_ARG_TYPE('superCtor', 'Function', superCtor);
^
TypeError [ERR_INVALID_ARG_TYPE]: The...
3
Solved
Doing this:
import $ from 'jquery';
Shows the error
The $ prefix is reserved, and cannot be used for variable and import names svelte(illegal-declaration)
3
I'm trying to implement firebase in Sapper.
I installed the modules (@firebase/app, @firebase/auth, @firebase/firestore) and then I wrote a configuration file:
import firebase from '@firebase/app';...
3
Solved
I am currently writing an app with svelte, sapper and tailwind. So to get tailwind working I have added this to my rollup config
svelte({
compilerOptions: {
dev,
hydratable: true,
},
preproces...
Hawkweed asked 2/1, 2021 at 17:50
4
Solved
<script context="module">
import GhostContentAPI from '@tryghost/content-api';
// const api = 'http://localhost/posts';
const api = new GhostContentAPI({
url: 'http://localhost',
key: '...
Urbain asked 8/4, 2020 at 16:43
4
I'm working on a new website, and although things were working well as we developed locally we've run into an issue when we tried to deploy on Vercel. The app uses the Sapper framework for both the...
Calvaria asked 1/8, 2020 at 18:55
2
Solved
I want to export the type that I defined in one of my files and import it inside another file.
export type myNewType = {name: string};
linter show me bellow error when I add export:
Modifiers cann...
Kathlenekathlin asked 25/9, 2020 at 12:48
3
Solved
While I was using Sapper to build a project whenever I fetch data from server, preload function is declared inside of script context="module" like this below.
<script context="module">
expo...
1
Solved
I am trying to get AdSense setup in my Sapper built website but I have had no success. I have added the code to the template.html file and it works, but I will like to show this on a specific page ...
2
Solved
I have a CSS rule which I used for global style, the style worked but my terminal keep show me this warning, how can I disable it?
src/components/Navbar.svelte changed. rebuilding...
• server
src/r...
4
Solved
I want to realize a simple page (route) transition in Sapper. Something that is easily achievable with Nuxt for example. Does anyone have an idea how to realize that with Sapper?
I already wrapped...
Myxoma asked 12/8, 2019 at 15:30
3
Solved
I have a page that has a nav bar with a "Quarters" link. Under the Quarters link, when the user is on the /quarters route, a list of quarters will be shown, like 2019Q2 etc. The url will be /quarte...
2
Solved
I am using Svelte/Sapper templae and added Attractions UI, but I cannot apply any class/styles to their custom components, like so:
<TextField class='search-box' type='search' />
<style>...
2
Solved
Right now, I have a menu which on click of a hamburger button can be expanded or collapsed. The default state of the menu is true meaning its expanded, but when I go to a different route where the ...
Carmon asked 30/3, 2021 at 19:55
2
On a 404 error, I don't want to display a 404 page. Instead, I'd like to redirect back to the index page if the user is logged in or to the login page if the user is logged out. I'm already able to...
Olcott asked 22/10, 2019 at 1:18
1
I am translating my little website from express+handlebars to an express+sapper project.
I would like to catch server side errors (for instance, a voluntary error when you go to /api/error) and re...
Hiroko asked 21/2, 2020 at 15:19
1 Next >
© 2022 - 2024 — McMap. All rights reserved.