Skip to content

Merging source maps #145

Description

@irundaia

I can have multiple steps that transform a source file. For instance, suppose that I use less to transform *.less files to *.css files and then use autoprefixer to transform those *.css files.

Both less and autoprefixer will output source maps, but in the end we only get the source map from the output of autoprefixer to the (intermediate) output of less rather than the original source file. As a developer, this complicates finding the source of a particular bug.

To remedy this, I was thinking about writing a plugin that is able to merge all source maps produced when pushing a source file through the assets pipeline. To do this, I'd need to know which source maps could be concatenated, i.e. a sequence of source maps generated for a particular input file.

Ex:

style.less  --less-->  less/style.css(.map)  --autoprefixer-->  autoprefixer/style.css(.map)

For the input style.less I'd like to get a Seq("less/style.css.map", "autoprefixer/style.css.map")

Is there any way of getting this information?

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