Comments (7)
FWIW, specifically adding the .map file to the request:
[email protected](underscore-min.js+underscore-min.map)
Does not help, because dev tools still makes the automatic request to the /g/ directory.
from api.
Not sure how to fix this. I can detect when /g/ gets requested a map file but not I don't know how to figure out what project contains the map file. Not even speaking of the version of the project.
Would it work if I simply responded with an empty 200 reply?
from api.
An empty 200 would end up breaking the .map functionality in dev tools too, so that wouldn't be any better than the 404.
The only way I can think to determine which project+version will need the .map file is when you're compiling the minned javascript in the first place. In order to support .map, I believe a js file is supposed to have a line like //# sourceMappingURL=underscore-min.map
, so it might be possible to detect that, and as you are minning the file, rewrite the = location to the proper place (which would be whichever directory you're retrieving the actual .min js from).
from api.
The browser makes a separate HTTP request for the map file. So I don't know what URL originally generated the .map request. And I don't want to modify the files in any way. Users should know what they are getting before hand. No on-the-fly rewrites.
I say empty 200 because at least this way there are no warnings/errors. And there is absolutely no reason to use map files in a grouped URL, they are meant for debugging. If you want to debug a library you should do it at least by loading the normal file or even better the unminified one :)
What do you think?
from api.
I deployed the fix. In any case its better to get rid off 404 errors.
Let me know what you think on this topic.
P.S. This is the API repo, you should use jsdelivr/jsdelivr next time for this kind of issues :)
from api.
Oh wow, I didn't realize I was leaving issues in the API repo!
You're right, if someone wants to debug a library, they ought to be loading the file independently. Makes sense to me. I wasn't needing to debug, we just noticed the 404.
from api.
Still an issue with this
jsdelivr/jsdelivr#3814
from api.
Related Issues (20)
- Version sorting HOT 10
- API returns no versions (urgent) HOT 5
- Move the API away from AppFog HOT 8
- Am I right to assume that I cannot get data for multiple librarys with one api call? HOT 4
- Searching by URL HOT 1
- jQuery failed to update latest beta1 HOT 2
- File paths HOT 14
- Incorrect author format for some CDNJS projects HOT 3
- pagination need? HOT 3
- The result order is not right HOT 3
- Default filename for specified version HOT 8
- API is not detecting new projects HOT 2
- Specify Content Security Policy? HOT 1
- API future HOT 3
- Add SRI to API HOT 1
- Add a download/hit count to the API HOT 7
- API endpoint down? HOT 2
- "bootstrap" alias is gone in v1 HOT 7
- Remove X-Requested-With
- Make sure logentries is utilized HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.