<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p>
<p dir="auto">Feature.</p>
<p dir="auto"><strong>If this is a feature request, what is motivation or use case for changing the behavior?</strong></p>
<p dir="auto">webpack-cli does a lot of neat things, but it's huge, has a huge dependency list, and I don't personally need <em>any</em> of its features other than a tiny CLI that takes args and passes them to a webpack compiler. It's also annoying to have to remember to install an additional dependency for each web project.</p>
<p dir="auto">Would you consider providing an extremely minimal CLI within the webpack package itself, which simply parsed args and sent them to a webpack instance? Everyone would still be free to use webpack-cli if they want/need, but no one would be forced to install an extremely large tool just to call webpack from the command line.</p>
<h1 dir="auto">Bug report</h1>




<p dir="auto"><strong>What is the current behavior?</strong><br>
Currently have 42 line of codes in a utils.js file which will be used in another Module Federation.</p>
<p dir="auto"><strong>Federate Module 1</strong></p>
<p dir="auto">delta.js // with 22 line of codes</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export const SAMPLE = 'SAMPLE';"><pre class="notranslate"><code class="notranslate">export const SAMPLE = 'SAMPLE';
</code></pre></div>
<p dir="auto">utils.js // with 42 line of codes. All are exported functions</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { getUserProfile }  from './config';
import * as delta from './delta'; 

export const thisMethodIsTruncated = () =&gt; {
const { user } = getUserProfile();
....
}

export const method2 = () =&gt; { ... }

export const method3 = () =&gt; { ... }

.... //upto line 42 or more"><pre class="notranslate"><code class="notranslate">import { getUserProfile }  from './config';
import * as delta from './delta'; 

export const thisMethodIsTruncated = () =&gt; {
const { user } = getUserProfile();
....
}

export const method2 = () =&gt; { ... }

export const method3 = () =&gt; { ... }

.... //upto line 42 or more
</code></pre></div>
<p dir="auto">webpack.config.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="new ModuleFederationPlugin({
  name: 'module1',
  exposes: {
    './utils': './src/common/utils.js',
  },
  ...
})"><pre class="notranslate"><code class="notranslate">new ModuleFederationPlugin({
  name: 'module1',
  exposes: {
    './utils': './src/common/utils.js',
  },
  ...
})
</code></pre></div>
<p dir="auto"><strong>Federated Module 2</strong></p>
<p dir="auto">module2.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="useEffect(() =&gt; {
  import('module1/utils').then((util) =&gt; {
    const { thisMethodIsTruncated  } = util;
    thisMethodIsTruncated() // thisMethodIsTruncated  is not a function
  })
}, [])"><pre class="notranslate"><code class="notranslate">useEffect(() =&gt; {
  import('module1/utils').then((util) =&gt; {
    const { thisMethodIsTruncated  } = util;
    thisMethodIsTruncated() // thisMethodIsTruncated  is not a function
  })
}, [])
</code></pre></div>
<p dir="auto">webpack.config.js //module 2</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="new ModuleFederationPlugin({
  name: 'module2',
  remotes: {
    module1: 'module1',
  }
...
});"><pre class="notranslate"><code class="notranslate">new ModuleFederationPlugin({
  name: 'module2',
  remotes: {
    module1: 'module1',
  }
...
});
</code></pre></div>
<p dir="auto"><strong>Solution Weird</strong><br>
Create a new file and move this method thisMethodIsTruncated</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
steps provided above</p>






<p dir="auto"><strong>What is the expected behavior?</strong><br>
should be able to import federated module 1 in federated module 2.</p>


<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version:  5.41.0<br>
Node.js version: 12.16.0<br>
Operating System: windows 10<br>
Additional tools: na</p>