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
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 file changed
+9
-6
+9
-6
@@ -16,14 +16,17 @@ class ProtectFromImportingNonDependencies {
|
|||||||
const isDependencyOfDependency =
|
const isDependencyOfDependency =
|
||||||
toBeResolved.context.includes("node_modules");
|
toBeResolved.context.includes("node_modules");
|
||||||
|
|
||||||
if (!isLocalDependency && !isDependencyOfDependency) {
|
|
||||||
|
|
||||||
const dependencyName = getDependencyName(toBeResolved.request);
|
const dependencyName = getDependencyName(toBeResolved.request);
|
||||||
|
|
||||||
nodeModulesToBeResolved.add(dependencyName);
|
const dependencyWeAreInterested =
|
||||||
}
|
!isLocalDependency && !isDependencyOfDependency && dependencyName;
|
||||||
});
|
|
||||||
});
|
if (dependencyWeAreInterested) {
|
||||||
|
nodeModulesToBeResolved.add(dependencyName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
compiler.hooks.afterCompile.tap("compile", () => {
|
compiler.hooks.afterCompile.tap("compile", () => {
|
||||||
const notSpecifiedDependencies = [...nodeModulesToBeResolved].filter(
|
const notSpecifiedDependencies = [...nodeModulesToBeResolved].filter(
|
||||||
|
|||||||
Reference in new issue
Block a user