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
optimacms-0.1.61 spec/dummy/node_modules/resolve-url-loader/node_modules/loader-utils/lib/getCurrentRequest.js
optimacms-0.1.61 spec/dummy/node_modules/adjust-sourcemap-loader/node_modules/loader-utils/lib/getCurrentRequest.js
optimacms-0.1.61 spec/dummy/node_modules/file-loader/node_modules/loader-utils/lib/getCurrentRequest.js
optimacms-0.1.61 spec/dummy/node_modules/loader-utils/lib/getCurrentRequest.js
optimacms-0.1.61 spec/dummy/node_modules/@rails/webpacker/node_modules/style-loader/node_modules/loader-utils/lib/getCurrentRequest.js
optimacms-0.1.61 spec/dummy/node_modules/css-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.18.0 test/dummy/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.18.2 test/dummy/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.16.1 test/dummy/node_modules/style-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.16.1 test/dummy/node_modules/webpack-cli/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.16.1 test/dummy/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.16.1 test/dummy/node_modules/babel-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.16.1 test/dummy/node_modules/sass-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.16.1 test/dummy/node_modules/file-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.15.2 test/dummy/node_modules/babel-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.15.2 test/dummy/node_modules/webpack-cli/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.15.2 test/dummy/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.15.2 test/dummy/node_modules/sass-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.15.2 test/dummy/node_modules/style-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.15.2 test/dummy/node_modules/file-loader/node_modules/loader-utils/lib/getCurrentRequest.js