question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with Sapper and Typescript

See original GitHub issue

Can’t seem to get it to work in Sapper/Rollup/Typescript. Build (also dev) hangs forever … Is there some way to debug/see what’s going on?

Config:

   svelte({
        preprocess: [
          sveltePreprocess.typescript(),
          require("svelte-windicss-preprocess").preprocess({
            config: "tailwind.config.js", // tailwind config file path
            compile: true, // false: interpretation mode; true: compilation mode
            prefix: "windi-", // set compilation mode style prefix
            globalPreflight: true, // set preflight style is global or scoped
            globalUtility: true, // set utility style is global or scoped
          }),
        ],

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
alexanderniebuhrcommented, Feb 20, 2021

@tommywalkie @ottsch I just found a working way to fix them issue. Just please be kindly and have some more patience. I need to clean everything up, but should be fixed the next days.

2reactions
alexanderniebuhrcommented, Feb 20, 2021

This is not a problem of this project it seems that you are not implementing dynamic classes correctly. Please find information here https://svelte.dev/tutorial/classes or here https://flaviocopes.com/svelte-dynamically-apply-css/

It must be either of the ways down here. They are working

<script>
  let bgRed = true;
</script>

<div class="px-1.5 {bgRed ? "bg-red-100" : ""}">
</div>
<script>
  let currentPage = 0;
</script>

<style>
  .selected {
    background-color: #ff3e00;
    color: white;
  }
</style>

<div class="px-1.5" class:selected={currentPage == 0}>
</div>
<script>
  let ishidden = true;
</script>

<div class="px-1.5" class:hidden={ishidden}>
</div>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript issues with v0.29.0 (tested in sveltejs/sapper ...
Describe the bug I upgraded Sapper in a new sveltejs/sapper-template rollup project and see Typescript errors when running npm i && npm run ......
Read more >
Sapper compiles but has TypeScript errors : r/sveltejs - Reddit
Sapper compiles but has TypeScript errors ... According to this issue it should fail if syntax errors are present, but for me it...
Read more >
Use TypeScript with Svelte / Sapper - DEV Community ‍ ‍
Thank you for the tutorial Markus! I tried to use it, but it gives the error below: Error: Cannot find module 'C:\sapper-with-ts-sample_sapper ......
Read more >
Sapper vs TypeScript | What are the differences? - StackShare
Sapper - A lightweight web framework written in Rust. TypeScript - A superset of JavaScript that compiles to clean JavaScript output.
Read more >
Extend Polka Request object using Typescript - Stack Overflow
By doing this I have this Typescript error : Property 'foo' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs,.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found