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.

Broken bundlephobia

See original GitHub issue

It never happened to me before: svelte-spa-router can’t be bundlephobied: https://bundlephobia.com/result?p=svelte-spa-router

Can I ask you why?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ItalyPaleAlecommented, Apr 10, 2020

I tried other Svelte modules. Some work, some don’t.

It seems that those who work are exporting pre-compiled files. This router is not. I have decided not to export a pre-compiled file because:

  1. This router wouldn’t make sense as a standalone component anyways. It’s designed to be used with Svelte 3 and only with it
  2. I prefer users to compile the router themselves, so they use the same version of the Svelte compiler as the rest of their code
  3. It would add complexity in managing the project and each release, and it would force me to re-release the router just to update the Svelte compiler used, and given points 1 and 2 above it doesn’t provide any more value

As for this router’s size… Keeping this minimal has always been my main goal, and it’s one of the main selling points. I’ve turned down a lot of feature requests because of that too.

One other important point is that this router only has one runtime dependency, on https://github.com/lukeed/regexparam (which has no runtime dependencies itself). This is to keep the router small, but even more importantly to maintain a lean software supply chain and reduce the risk of security issues. (As a note, starting with version 2.1.0, the exact version of regexparam is also pinned to a precise version so it won’t pick up new versions automatically, for security reasons: https://github.com/ItalyPaleAle/svelte-spa-router/releases/tag/v2.1.0)

0reactions
frederikhorscommented, Apr 10, 2020

I agree with you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

check-broken-links v2.0.4 Bundlephobia
Size of check-broken-links v2.0.4 is 2.6 MB (minified), and 675.9 kB when compressed ... Bundlephobia helps you find the performance impact of npm...
Read more >
@grimmbraten/bundlephobia-cli - npm
Start using @grimmbraten/bundlephobia-cli in your project by running `npm i ... So if you require to update to the latest (breaking changes version)...
Read more >
Jason Lengstorf ⚡️ on Twitter: "this is a great thread ...
this is a great thread breaking down the difference between a package's ... When assessing a library's size with Bundlephobia, make sure to...
Read more >
How to Worry About npm Package Weight - CSS-Tricks
Bundlephobia will give you a look at the total size — both zipped and ... So far, we've broken down the three letters...
Read more >
I launched Autobundle project which automatic bundle your ... - Reddit
The English is so broken that I cannot even discern what this tool is for. ... bundle your dependency, ideally from Bundlephobia, powered...
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