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

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

Open
dmurat opened this issue Nov 22, 2016 · 1 comment
Open

Comments

@dmurat
Copy link

dmurat commented Nov 22, 2016

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

@dmurat
Copy link
Author

dmurat commented Nov 23, 2016

Here is a PR: #73
Tnx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant