diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -235,7 +235,7 @@ class AureliaWebpackPlugin {
                 }
               }
             }
-            if (moduleId) {
+            if (moduleId && !modules.find(m => m.id === moduleId)) {
               module.id = moduleId;
             }
           }
fix(index): do not reassign moduleId when one with the same name exists already