1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix: Make importing styles not break the builds (#7550)

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2023-04-14 09:06:58 +03:00 committed by GitHub
parent 1e0cb9fc14
commit 2debe61359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,14 +16,17 @@ class ProtectFromImportingNonDependencies {
const isDependencyOfDependency =
toBeResolved.context.includes("node_modules");
if (!isLocalDependency && !isDependencyOfDependency) {
const dependencyName = getDependencyName(toBeResolved.request);
nodeModulesToBeResolved.add(dependencyName);
}
});
});
const dependencyWeAreInterested =
!isLocalDependency && !isDependencyOfDependency && dependencyName;
if (dependencyWeAreInterested) {
nodeModulesToBeResolved.add(dependencyName);
}
});
}
);
compiler.hooks.afterCompile.tap("compile", () => {
const notSpecifiedDependencies = [...nodeModulesToBeResolved].filter(