Sha256: e4052a7e83b6c60e098a9d169b3a7ef12ffdd10f8e8ccd9f565d2f99fb6fdae4

Contents?: true

Size: 359 Bytes

Versions: 88

Compression:

Stored size: 359 Bytes

Contents

'use strict';

function getCurrentRequest(loaderContext) {
  if (loaderContext.currentRequest) {
    return loaderContext.currentRequest;
  }

  const request = loaderContext.loaders
    .slice(loaderContext.loaderIndex)
    .map((obj) => obj.request)
    .concat([loaderContext.resource]);

  return request.join('!');
}

module.exports = getCurrentRequest;

Version data entries

88 entries across 28 versions & 9 rubygems

Version Path
ilog-0.3.3 node_modules/loader-utils/lib/getCurrentRequest.js
jester-data-8.0.0 node_modules/loader-utils/lib/getCurrentRequest.js
ezii-os-5.2.1 node_modules/loader-utils/lib/getCurrentRequest.js
ezii-os-2.0.1 node_modules/loader-utils/lib/getCurrentRequest.js
ezii-os-1.1.0 node_modules/loader-utils/lib/getCurrentRequest.js
ezii-os-1.0.0 node_modules/loader-utils/lib/getCurrentRequest.js
ezii-os-0.0.0.1.0 node_modules/loader-utils/lib/getCurrentRequest.js
ezii-os-0.0.0.0.1 node_modules/loader-utils/lib/getCurrentRequest.js