Skip to content

Support for streaming source maps alongside files #303

Description

@theefer

Are there any plans to provide better support for source maps with Gulp? It seems that Gulp elegantly removes the need for intermediate files by letting resources flow through transformations directly, but there doesn't seem to be a standard way of handling the source map associated with each transformation. As a result, many Gulp plugins seem to either not support source maps (gulp-requirejs, gulp-concat, etc), or only support them as inlined data-urls (gulp-less, gulp-sass). Those plugins that do support standalone source maps typically pipe them as another file in the stream (gulp-coffee, gulp-uglify), which only works as the last transformation. If there is any more transformation after it (say, uglify after coffee, or concat after uglify), it's unlikely to give the expected result.

Even gulp-uglify doesn't support input source maps (say from a previous transformation), and it's unclear how it could, seeing as there's no explicit link between the source map and the file it maps in the stream.

Is there any will or items on the Gulp roadmap aiming at making it easier for users and plugin developers to serve source maps for their transformed files?

Full disclaimer: I'm the author of Plumber, a build tool based on declarative pipelines with many similarities with Gulp. One of the differences though is that Plumber and all its operations support source maps natively by default, by attaching a source map to each resource and letting each operation provide the source map for the transformation it applied.

The reason I'm inquiring about Gulp plans regarding source maps is that Gulp is already a great project, and I want to understand to what extent my efforts may be redundant, if features similar to Plumber's are also envisioned for Gulp. So please consider this as an attempt for constructive feedback between similar projects!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions