Last change
on this file 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 |
|
---|
3 | function 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 |
|
---|
16 | module.exports = getCurrentRequest;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.