Closed make-github-pseudonymous-again closed 3 years ago
Inline sourcemaps are generally not recommended because they increase bundle size and parse times. Some configurations remove them, but not all.
FWIW Microbundle isn't ignoring the babel config, it's using Rollup to produce bundles. Changing the babel config only changes the code string passed to Rollup, not the output.
We don't currently support inline sourcemaps because they are typically misused and a footgun. Do you have a compelling case that requires it?
Do you have a compelling case that requires it?
None. I am holding on some old habits. I am open to change my behavior. I am curious because I thought having the source map inline simplifies development tools. I had overlooked the parsing time issue. And that alone should be enough not to use the maps inline. Even though these get stripped in production.
I imagine you also gain in development performance when you only load these maps when required. Not only parsing but also transfer time. Although in my case it happens locally so I do not care.
I think it is good that you do not support inline source maps. It prevented me from perpetuating a bad habit.
Thank you for opening this, @make-github-pseudonymous-again
We're marking this issue as answered and closing it for now but please feel free to reopen this and comment if you would like to continue this discussion. We hope we managed to help and thank you for using Microbundle!
The only compelling reason is using it during development, inline source maps make it a lot easier if the rest of the application isn't designed to handle sourcemaps.
I have babel configured with inline sourceMaps using
"sourceMaps": "inline"
. It works when I usebabel
instead ofmicrobundle
. You can see the config here: https://github.com/aureooms/set-alarm/blob/9f7f4900073af814016bed15fdea4cb90b0bb051/package.json#L33 Microbundle seems to ignore this choice. Is this a bug? Feature? Is there a case against inline source maps?