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:
parent
1e0cb9fc14
commit
2debe61359
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user