TLDR: This issue is for an option to not produce source maps.
I'm using pika/web for three.js & it's orbit controls:
"@pika/web": {
"webDependencies": [
"three",
"three/examples/jsm/controls/OrbitControls.js"
]
},
This also produces source map files which are huge and I don't need:
web_modules/
drwxr-xr-x@ 3 owen staff 96B Jun 15 13:43 three/
-rw-r--r--@ 1 owen staff 562K Jun 15 12:50 three.js
-rw-r--r--@ 1 owen staff 1.8M Jun 15 12:50 three.js.map
web_modules/three/examples/jsm/controls:
-rw-r--r--@ 1 owen staff 10K Jun 15 12:50 OrbitControls.js
-rw-r--r--@ 1 owen staff 38K Jun 15 12:50 OrbitControls.js.map
I think this comes from the tracer rollup plugin? I'd like an option to not produce source maps.
Sure, I think that makes sense as an opt-in option. Can I ask why you don't want them, if they're free? You're just not using them?
First, let me admit: I am ridiculously minimalist! I don't use workflow tools that require "compiling" my JS before running it. My only workflow tools come in at git commit or npm install/publish time.
So I'm very Vanilla JS, and all my workflow is in npm scripts.
This has little to do with the map thing but it clarifies that I'm, err, different from todays dev in the same way you've discovered .. they are definitely not minimalist! And truth be told, following the crowd, so to speak.
So in the case of maps, I only used them years ago when modules required lots of babel etc. But when modules hit the browsers, I reverted to not needing them. Being lazy, I didn't look for other good reasons to have maps.
It does, however, make sense to be able to un-minify, code. Chrome tries to support "pretty printing" minified code for example. I don't know if the maps help in that case, I couldn't get devtools to pretty print a test minified file.
So, long story short, because I (apparently) don't need them, I made this issue. I'm fine putting this on the back burner, I can git-ignore them if I want to, and your other work is far more important.
I second this request, mainly because I've so rarely needed source maps for third party libraries, because I've rarely needed to debug them. (The bug is 99.99% of the time in my own code, not theirs.)
I don't need source maps because all code is es6 originally. They are huge and they slow down the generation.
This has been merged to master via --no-source-map. Thanks @sdegutis for contributing and everyone for the discussion!
Note: Support has been merged to master but won't be released for a few more days. But, you can try it today via:
npm install http://cdn.pika.dev/@pika/web/master
Most helpful comment
I don't need source maps because all code is es6 originally. They are huge and they slow down the generation.