Above you can view that a source map can be an object containing that is literal of juicy info:
- Variation quantity that the origin map is situated off
- The file title associated with generated code (Your minifed/combined production file)
- sourceRoot lets you prepend the sources having a folder structure – this will be also a place preserving strategy
- sources contains most of the file names which were combined
- names contains all variable/method names that appear through your rule.
- Finally the mappings home is when the miracle happens utilizing Base64 VLQ values. The genuine area preserving is completed right right here.
Base64 VLQ and maintaining the supply map little
Initially the origin map spec had a really verbose production of the many mappings and resulted in the sourcemap being about 10 times the dimensions of the generated rule. Variation two paid down that by around 50 version and% three paid down it once more by another 50%, therefore for the 133kB file you get with a
300kB supply map. So just how did they reduce steadily the size while nevertheless keeping the mappings that are complex?
VLQ (Variable size amount) can be used along side encoding the value in to a Base64 value. The mappings home is a brilliant string that is big. In this particular sequence are semicolons (;) that represent a line quantity inside the file that is generated. Within each line you can find commas (,) that represent each part within that line. Each one of these segments is either 1, four or five in variable size areas. Continue reading »