Sapper: [Question] How to refactor contents of global.css?

Created on 6 Jun 2018  路  2Comments  路  Source: sveltejs/sapper

Use case
Load some static, external style artifacts (fonts, icons, etc) from CDN via existing _global.css_.

Method
Edit _global.css_ and save.

Expected
App picks up the refactored contents and loads external style artifacts. Very sappery!

Actual experience
App uses original contents of _global.css_ as from the template repo. I'm guessing this is cached somewhere but how can one clear that cache or get the bundler to read the refactored version of _global.css_. Sorry, I'm not a webpack guy if this is cockpit error.

Most helpful comment

hit global.css manually in the browser via its url. I've experienced this a few times too. Component css hot-reloads but global.css doesn't

All 2 comments

hit global.css manually in the browser via its url. I've experienced this a few times too. Component css hot-reloads but global.css doesn't

Nice! Thanks for the tip.

Not sure it's all about hot-reloads as I had done 'npm run dev' a few times, but whatever. It should also be noted that it's simple enough to refactor app/template.html to include any arbitrary CSS resource.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

freedmand picture freedmand  路  4Comments

nolanlawson picture nolanlawson  路  4Comments

Rich-Harris picture Rich-Harris  路  3Comments

UnwrittenFun picture UnwrittenFun  路  4Comments

Snugug picture Snugug  路  4Comments