diff --git a/source/dub/compilers/compiler.d b/source/dub/compilers/compiler.d
index 8565a5b..0360abc 100644
--- a/source/dub/compilers/compiler.d
+++ b/source/dub/compilers/compiler.d
@@ -10,9 +10,6 @@
 public import dub.compilers.buildsettings;
 public import dub.platform : BuildPlatform, matchesSpecification;
 
-import dub.compilers.dmd;
-import dub.compilers.gdc;
-import dub.compilers.ldc;
 import dub.internal.vibecompat.core.file;
 import dub.internal.vibecompat.core.log;
 import dub.internal.vibecompat.data.json;
@@ -25,13 +22,6 @@
 import std.process;
 
 
-static this()
-{
-	registerCompiler(new DMDCompiler);
-	registerCompiler(new GDCCompiler);
-	registerCompiler(new LDCCompiler);
-}
-
 /** Returns a compiler handler for a given binary name.
 
 	The name will be compared against the canonical name of each registered
diff --git a/source/dub/dub.d b/source/dub/dub.d
index 3976a9a..b815e7c 100644
--- a/source/dub/dub.d
+++ b/source/dub/dub.d
@@ -53,6 +53,16 @@
 	}
 }
 
+static this()
+{
+	import dub.compilers.dmd : DMDCompiler;
+	import dub.compilers.gdc : GDCCompiler;
+	import dub.compilers.ldc : LDCCompiler;
+	registerCompiler(new DMDCompiler);
+	registerCompiler(new GDCCompiler);
+	registerCompiler(new LDCCompiler);
+}
+
 /// The URL to the official package registry.
 enum defaultRegistryURL = "http://code.dlang.org/";