Above you can view that the supply map is an object literal containing lots of juicy information:
- Variation quantity that the origin map is dependent off
- The file name associated with the code that is generatedYour minifed/combined production file)
- sourceRoot lets you prepend the sources by having a folder structure – this will be additionally a place preserving method
- sources contains all of the file names that have been combined
- names contains all names that are variable/method appear through your rule.
- Finally the mappings home is where the miracle occurs Base64 that is using VLQ. The genuine area preserving is done right right here.
Base64 VLQ and maintaining the supply map tiny
Initially the origin map spec had a really verbose production of the many mappings and led to the sourcemap being about 10 times how big is the code that is generated. Variation two paid down that by around 50 version and% three paid off it once more by another 50%, therefore for a 133kB file you get by having a
300kB supply map. So just how did they reduce steadily the size while nevertheless keeping the complex mappings?
VLQ (Variable size volume) is employed along side encoding the worthiness right into a Base64 value. Continue reading