"use strict"; function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _loaderutils = require('loader-utils');
var _sucrase = require('sucrase');

function loader(code) {
  const webpackRemainingChain = (0, _loaderutils.getRemainingRequest)(this).split("!");
  const filePath = webpackRemainingChain[webpackRemainingChain.length - 1];
  const options = (0, _loaderutils.getOptions)(this) ;
  return (0, _sucrase.transform)(code, {filePath, ...options}).code;
}

module.exports = loader;
