Skip to content

Create multiple sourcemaps from a single build #6813

@Xotic750

Description

@Xotic750

Do you want to request a feature or report a bug?

feature

What is the current behavior?

Set devtool;. NODE_ENV === PRODUCTION ? 'nosources-source-map' : 'eval-source-map';

Sourcemap type is built.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

If this is a feature request, what is motivation or use case for changing the behavior?

What we'd like is to be able to create multiple sourcemaps for production as a single run.

Set devtool: NODE_ENV === PRODUCTION ? ['nosources-source-map', 'source-map'] : 'eval-source-map';

The first sourcemap will be used client side and included in the the js e.g. //# sourceMappingURL=index.js.map

The second sourcemap would be used for our monitoring system, and would have a filename for example index.js.map2 or anything sensible.

All this would be performed in a single build run.

Perhaps this is already possible and we just haven't discovered how.

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions