return void from requestToHandle to let native handling in package run

[MAILPOET-3920]
This commit is contained in:
Nadir Seghir
2021-11-05 13:27:00 +01:00
committed by Veljko V
parent bdb2434ed9
commit 4b20130d68

View File

@@ -415,7 +415,14 @@ function requestToExternal(request) {
if (wcDepMap[request]) {
return wcDepMap[request];
}
return undefined;
// DependencyExtractionWebpackPlugin has native handling for @wordpress/*
// packages, for that handling to kick in, we must not return anything from
// function.
/* eslint-disable consistent-return */
/* eslint-disable no-useless-return */
return;
/* eslint-enable consistent-return */
/* eslint-enable no-useless-return */
}
function requestToHandle(request) {
@@ -426,7 +433,14 @@ function requestToHandle(request) {
if (wcHandleMap[request]) {
return wcHandleMap[request];
}
return undefined;
// DependencyExtractionWebpackPlugin has native handling for @wordpress/*
// packages, for that handling to kick in, we must not return anything from
// function.
/* eslint-disable consistent-return */
/* eslint-disable no-useless-return */
return;
/* eslint-enable consistent-return */
/* eslint-enable no-useless-return */
}
const marketingOptinBlock = Object.assign({}, wpScriptConfig, {