Skip to main content

All Questions

2 votes
0 answers
368 views

How to change default location of svelte css in rollup.config.js?

I'm using svelte compoenents in some pages of myapp. the directory tree is like: -myapp --controller --static --svelte I have manged to setup svelte to ouput js bundle to myapp/static/js/ by ...
dafreako's user avatar
0 votes
2 answers
3k views

Rollup/Svelte is not producing chunkfiles for dynamic imports. How to make Components to lazy loadable chunks?

I want to lazy load some components in svelte. No Svelte-kit, just in pure svelte. I want to dynamically import a Svelte-Component and use it when required: const About = () => import("../...
CaspianTerrazzo's user avatar
0 votes
1 answer
447 views

Svelte : build component into AMD module in rollup

<script lang="ts"> export let name; // widget name let childComponent; import { onMount } from 'svelte'; onMount(() => { switch(name) { case '...
Mr.Wang from Next Door's user avatar
1 vote
0 answers
276 views

Rollup with svelte not compiling $lib properly

I have a svelte-kit app I'm compiling the svelte app into one js file with rollup the problem I have is when I import a component this way : import Foo from '$lib/Foo.svelte'; rollup is not compiling ...
JuleZ's user avatar
  • 276
6 votes
0 answers
1k views

Disable purging of unused CSS in svelte

is there a way to tell svelte to not remove my unused styles? I'm working with webcomponents and sub-components aren't styled if svelte purges the unused selectors. I hope there is a setting i can ...
Enick's user avatar
  • 111
2 votes
1 answer
661 views

Uncaught TypeError: svmd_es.Button is not a constructor implementing a UI toolkit in svelte

I'm new at Svelte and trying out a Material Design toolkit for my first experimentation. I found https://github.com/hkh12/svmd, which looked nice, and I added it to my Svelte project. According to the ...
Erik Oosterwaal's user avatar
4 votes
0 answers
3k views

Can I import packages into a Svelte Component?

I'm trying to write a front-end for an app that I've built. Having just learned about Svelte, I thought it would give me reason to explore the framework further. The Svelte boilerplate that I use ...
James's user avatar
  • 211
1 vote
3 answers
1k views

Why does Tone JS not play nice in a Svelte component?

I am fairly new to Svelte (I'm using version 2 until 3 is properly released) and I'm building a site that aims to do some audio analysis (FFT). I'm therefore incorporating the venerable ToneJS library ...
Anselan's user avatar
  • 396
6 votes
1 answer
1k views

Packaging imported javascript into svelte component using rollup

In my code, I want to import an external javascript file that is common across multiple components. When rollup builds the component, however, it has trouble resolving the imported dependency so it ...
Larry Maccherone's user avatar