Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Feature request - provide callback for specifying babel's inputSourceMap #72

@dmurat

Description

@dmurat

I will like to have more options for specifying babel's inputSourceMap option.
I believe this can be implemented quite easily by adding support for providing a callback through babelOptions.

Usage example:

    meta: {
      '*.js': {
        babelOptions: {
          sourceMaps: true,
          provideInputSourceMap: function(load) {
            return null;
          }
        }
      }
    }

To implement this support, line 176 in plugin-babel.js needs to be changed from

inputSourceMap: load.metadata.sourceMap,

to

inputSourceMap: (babelOptions.provideInputSourceMap && babelOptions.provideInputSourceMap(load)) || load.metadata.sourceMap,

I can provide PR if needed.

Tnx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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