source: trip-planner-front/node_modules/loader-utils/lib/getCurrentRequest.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 359 bytes
Line 
1'use strict';
2
3function getCurrentRequest(loaderContext) {
4 if (loaderContext.currentRequest) {
5 return loaderContext.currentRequest;
6 }
7
8 const request = loaderContext.loaders
9 .slice(loaderContext.loaderIndex)
10 .map((obj) => obj.request)
11 .concat([loaderContext.resource]);
12
13 return request.join('!');
14}
15
16module.exports = getCurrentRequest;
Note: See TracBrowser for help on using the repository browser.