Comments (5)
It totally can be included. Browser doesn't download source map unless you open devtools, so no 404 would happen.
from jdataview.
And well - the CDN version of library already points to correct source map so I'm not sure why you would ever get 404. http://jdataview.github.io/dist/jdataview.js
from jdataview.
When including jDataView through bower/requirejs, the sourcemap file is not part of the build (and neither should it be IMO).
from jdataview.
It's not part of the build - it should be just in the public folder where you put everything else. Source maps are important for debugging any problems, otherwise you might not find where the issue is and should you want to report it, I would be unable to find it as well. That's why all the libraries try to provide it or devs try to generate it as a part of build process. Moreover - your real users will never get 404 error even if you decide not to include it for some reason, so I don't see a problem.
from jdataview.
In development, it is fine to have sourcemaps in a public folder. That is why I would expect there to be a non-minified version of a library with sourcemap (if applicable), and a minified version without sourcemap. That way, in development, you can use the non-minified file with sourcemap to try to debug problems while using the minified version without sourcemap in a production environment.
Working through our setup to explain the details of why this is a problem for us, it seems that I stumbled upon the real source of frustration in our setup; gruntjs/grunt-contrib-requirejs#95 . Our problem was that while inspecting the production site, we generated 404s seemingly due to the missing jdataview.js.map file and PHPIDS banned us temporarily if causing enough 404s from the same IP (our office). The real cause of frustration was that (seemingly, at least) grunt-contrib-requirejs adds a semi-colon at the end of the sourcemap url (and jdataview is the only library we use with a dist-file with sourcemap), and due to the semicolon the comment was not stripped away by uglify2. This in turn led PHPIDS to give extra "attack score" on the sourcemap 404s due to the semicolon at the end (detected as an XSS attempt).
So, while I still think the minified version could be without sourcemap and the non-minified with sourcemap, it's totally up to you to decide.
Thanks for your effort on jDataView!
from jdataview.
Related Issues (20)
- Uint64.toString fails for large numbers HOT 2
- Using jDataView in chrome throws Uncaught ReferenceError: NODE is not defined HOT 3
- Better support for negative bitLength HOT 11
- Use backing buffer/view's methods when available. HOT 5
- Use native methods for bit access HOT 4
- Remove string concatenation at runtime HOT 3
- Bitfields doesn't work well in littleEndian mode HOT 1
- it
- Bitfield API ignores endianness. HOT 2
- Question: Is jDataView runnable in web worker? HOT 1
- Question: How to convert the "uint16" value to half-precision float (i.e. "float16")? HOT 1
- Weird Float types (48 & 80 bit) HOT 1
- readString() with variable 7-bit based integer as prefix length HOT 1
- untar demo intersperses chunks of JavaScript in textareas HOT 1
- dataview constructor argument offset is invalid HOT 10
- Getting an error only after minification of dist/browser/jdataview.js? HOT 4
- Constuctor doesn't work the same as a real DataView? HOT 7
- Cannot use 'in' operator to search for 'Buffer' in undefined HOT 6
- Remove old fallbacks HOT 6
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 jdataview.