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
disco_app-0.14.0 test/dummy/node_modules/style-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.14.0 test/dummy/node_modules/sass-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.14.0 test/dummy/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.14.0 test/dummy/node_modules/file-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/webpack-cli/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/babel-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/file-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/sass-loader/node_modules/loader-utils/lib/getCurrentRequest.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/style-loader/node_modules/loader-utils/lib/getCurrentRequest.js
tang-0.2.1 spec/tang_app/node_modules/file-loader/node_modules/loader-utils/lib/getCurrentRequest.js
tang-0.2.1 spec/tang_app/node_modules/loader-utils/lib/getCurrentRequest.js
tang-0.2.1 spec/tang_app/node_modules/style-loader/node_modules/loader-utils/lib/getCurrentRequest.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/style-loader/node_modules/loader-utils/lib/getCurrentRequest.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/loader-utils/lib/getCurrentRequest.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/file-loader/node_modules/loader-utils/lib/getCurrentRequest.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/style-loader/node_modules/loader-utils/lib/getCurrentRequest.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/loader-utils/lib/getCurrentRequest.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/file-loader/node_modules/loader-utils/lib/getCurrentRequest.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/@ruby2js/webpack-loader/node_modules/loader-utils/lib/getCurrentRequest.js