diff --git a/lib/hard-basic-dependency-plugin.js b/lib/hard-basic-dependency-plugin.js
index <HASH>..<HASH> 100644
--- a/lib/hard-basic-dependency-plugin.js
+++ b/lib/hard-basic-dependency-plugin.js
@@ -3,6 +3,10 @@ const LoggerFactory = require('./logger-factory');
 const pluginCompat = require('./util/plugin-compat');
 const relateContext = require('./util/relate-context');
 
+let LocalModule;
+try {
+  LocalModule = require('webpack/lib/dependencies/LocalModule');
+} catch (_) {}
 
 function flattenPrototype(obj) {
   if (typeof obj === 'string') {
@@ -196,7 +200,10 @@ const freezeArgument = {
     return methods.mapFreeze('Dependency', null, arg, extra);
   },
   localModule(arg, dependency, extra, methods) {
-    // ...
+    return {
+      name: arg.name,
+      idx: arg.idx,
+    };
   },
   regExp(arg, dependency, extra, methods) {
     return arg ? arg.source : false;
@@ -251,7 +258,7 @@ const thawArgument = {
     return methods.mapThaw('Dependency', null, arg, extra);
   },
   localModule(arg, frozen, extra, methods) {
-    
+    return new LocalModule(extra.module, arg.name, arg.idx);
   },
   regExp(arg, frozen, extra, methods) {
     return arg ? new RegExp(arg) : arg;
Serialize LocalDependency's localModule member