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.

default priority /dist over "main"

See original GitHub issue

package.json’s main field seems to be aimed directly at npm, not browsers. So perhaps if there are no jsdelivr or browser fields, then the /dist folder should be the next highest priority when looking for the default file?

Example: spectacle: main (so jsdelivr’s default) = /lib/index.js is broken, but dist/spectacle.min.js is really the file that works.

I could improve the documentation &/or write a blog post to help. Though more automation is helpful.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
MartinKolarikcommented, Jul 30, 2018

This won’t be possible because we need to be able to resolve the default file without having a list of all available files. Also there are commonly multiple files in dist/ so we wouldn’t know which one to pick anyway.

main is useful for packages that ship umd builds and therefore don’t have different files for browsers and node (and also for packages which are browser-only).

0reactions
MartinKolarikcommented, Sep 14, 2021

This is going to be done soon in a redesign, based on our new API endpoint: https://github.com/jsdelivr/data.jsdelivr.com#get-package-entry-points

Read more comments on GitHub >

github_iconTop Results From Across the Web

Content Distribution Priorities - Microsoft Community Hub
Package Distribution Priority is the distribution priority for the package that you create. It has 3 values: High, Medium and Low. When a...
Read more >
Technical Note: Routing behavior depending on dist...
Priority preference : lowest value is preferred for the routing table; Distance preference : lowest value is preferred for the routing table.
Read more >
Traditional stack unit priority
The priority value can be from 0 through 255, with a priority of 255 being the highest. The default priority value assigned to...
Read more >
priority (Protocols VRRP) | Junos OS - Juniper Networks
Default: 100. If two or more devices have the highest priority in the VRRP group, the device with the VRRP interface that has...
Read more >
2. The Debian Archive — Debian Policy Manual v4.6.2.0
This is the default priority for the majority of the archive. Unless a package should be installed by default on standard Debian systems,...
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