JSPM

  • Created
  • Published
  • Downloads 603102
  • Score
    100M100P100Q181285F
  • License MIT

Package Exports

  • @parcel/source-map

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@parcel/source-map) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Parcel's source-map library

A purpose build source-maps library for combining and manipulating source-maps.

For just reading source-maps, this library does not outperform the probably more stable and well-known package source-map by Mozilla.

Why did we write this library

Parcel is a performance concious bundler, and therefore we like to optimise Parcel's performance as much as possible.

Our original source-map implementation used mozilla's source-map and a bunch of javascript and had issues with memory usage and serialisation times (we were keeping all mappings in memory using JS objects and write/read it using JSON for caching).

This implementation has been written from scratch in C++ minimizing the memory usage, by utilising indexes for sources and names and optimising serialisation times by using flatbuffers instead of JSON for caching.

Compile flatbuffer schema

cd ./src && ../flatc --cpp ./sourcemap-schema.fbs && cd ..