now returning resolvedRequest
This commit is contained in:
parent
a3cc7e8dac
commit
808af37b4e
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -56,7 +56,7 @@ Module._resolveFilename = function (request, parent, isMain) {
|
||||
let file = cache[resolvedRequest];
|
||||
let file2 = cache[resolvedRequest + '.js'];
|
||||
if (file || file2) {
|
||||
return request;
|
||||
return resolvedRequest;
|
||||
}
|
||||
else {
|
||||
return originalModuleResolve.apply(this, arguments);
|
||||
@ -70,9 +70,11 @@ exports.gulpPipe = function () {
|
||||
};
|
||||
exports.injectFileArray = (fileArray) => __awaiter(this, void 0, void 0, function* () {
|
||||
for (let fileObject of fileArray) {
|
||||
// console.log('injected:' + fileObject.path)
|
||||
/* if (/[yourTestFilenameHere.js]/.test(request)) {
|
||||
// console.log('injected:' + fileObject.path)
|
||||
} */
|
||||
cache[fileObject.path] = fileObject;
|
||||
}
|
||||
return fileArray;
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsMEJBQXVCO0FBRXZCLElBQUksTUFBTSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQTtBQUM5Qiw2QkFBNkI7QUFDN0IsZ0RBQWdEO0FBQ2hELHFDQUFxQztBQUtyQyxTQUFTLENBQUMsT0FBTyxDQUFDO0lBQ2hCLFlBQVksRUFBRSxVQUFVLElBQUk7UUFDMUIsRUFBRSxDQUFDLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUNoQixNQUFNLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLFFBQVEsQ0FBQyxRQUFRLEVBQUUsQ0FBQTtRQUN4QyxDQUFDO1FBQUMsSUFBSSxDQUFDLE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BQUEsUUFBUSxHQUFHO0lBQ3BCLE1BQU0sQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLFVBQVUsSUFBSSxFQUFFLEdBQUcsRUFBRSxFQUFFO1FBQ3pDLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFBO1FBQ3ZCLE1BQU0sQ0FBQyxFQUFFLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFBO0lBQ3ZCLENBQUMsQ0FBQyxDQUFBO0FBQ0osQ0FBQyxDQUFBO0FBT1UsUUFBQSxlQUFlLEdBQUcsQ0FBTyxTQUF1QjtJQUN6RCxHQUFHLENBQUMsQ0FBQyxJQUFJLFVBQVUsSUFBSSxTQUFTLENBQUMsQ0FBQyxDQUFDO1FBQ2pDOztZQUVJO1FBQ0osS0FBSyxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsR0FBRyxVQUFVLENBQUE7SUFDckMsQ0FBQztJQUNELE1BQU0sQ0FBQyxTQUFTLENBQUE7QUFDbEIsQ0FBQyxDQUFBLENBQUEifQ==
|
@ -53,7 +53,7 @@ Module._resolveFilename = function (request, parent, isMain) {
|
||||
let file = cache[resolvedRequest]
|
||||
let file2 = cache[resolvedRequest + '.js']
|
||||
if (file || file2) {
|
||||
return request
|
||||
return resolvedRequest
|
||||
} else {
|
||||
return originalModuleResolve.apply(this, arguments)
|
||||
}
|
||||
@ -73,7 +73,9 @@ export interface fileObject {
|
||||
|
||||
export let injectFileArray = async (fileArray: fileObject[]) => {
|
||||
for (let fileObject of fileArray) {
|
||||
// console.log('injected:' + fileObject.path)
|
||||
/* if (/[yourTestFilenameHere.js]/.test(request)) {
|
||||
// console.log('injected:' + fileObject.path)
|
||||
} */
|
||||
cache[fileObject.path] = fileObject
|
||||
}
|
||||
return fileArray
|
||||
|
Loading…
Reference in New Issue
Block a user