1 | var loaderUtils = require("loader-utils");
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | module.exports = function() {}
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | module.exports.pitch = function(remainingRequest) {
|
12 | if (this.cacheable) {
|
13 | this.cacheable();
|
14 | }
|
15 |
|
16 | return `
|
17 | var result = require(${loaderUtils.stringifyRequest(this, "!!" + remainingRequest)});
|
18 |
|
19 | if (result && result.__esModule) {
|
20 | result = result.default;
|
21 | }
|
22 |
|
23 | if (typeof result === "string") {
|
24 | module.exports = result;
|
25 | } else {
|
26 | module.exports = result.toString();
|
27 | }
|
28 | `;
|
29 | };
|