Define the factory function of the source map through Language.mapperFactory, which allows the insertion of customized mapping logic.
Motivation
Individual frameworks may require somewhat special mapping processing logic. For example, WebStorm-Angular requires special processing for overlapping mapping ranges. These processing may not be common to all frameworks, so it is best to make the mapping behavior itself customizable.
Usage
After creating the Language instance, set mapperFactory property to override the default SourceMap factory function.
Closes #203
Define the factory function of the source map through
Language.mapperFactory
, which allows the insertion of customized mapping logic.Motivation
Individual frameworks may require somewhat special mapping processing logic. For example, WebStorm-Angular requires special processing for overlapping mapping ranges. These processing may not be common to all frameworks, so it is best to make the mapping behavior itself customizable.
Usage
After creating the Language instance, set
mapperFactory
property to override the default SourceMap factory function.