<p dir="auto">Hello everyone,<br>
I have a project on react / typescript with webpack 2 and different components and modules and submodules refered by the main module from outside.<br>
The structure is this:<br>
in index.ts - are all my exports with</p>
<p dir="auto">export * from './"helper1"<br>
export * from './"helper2"<br>
export * from './"helper3"<br>
export * from './"authorize"</p>
<p dir="auto">and in the upper levels I'm exporting the folder name like this<br>
export * from './Common'</p>
<p dir="auto">export * from './Core'</p>
<p dir="auto">example:<br>
-App(folder)<br>
-Core(folder)<br>
-Common(folder)<br>
-helper1.ts<br>
-helper2.ts<br>
-helper3.ts<br>
-authorize.tsx<br>
index.ts - (export * from './helper1' export * from './helper2' export * from './helper3' export * from './authorize')</p>
<p dir="auto"><strong>when generate the final bundle with index exports it duplicates components (one and the same component is occured 2 or 3 times in bundle instead of one with different numbers like this:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* 445 */
/***/ (function(module, exports, __webpack_require__) {


var LogAppender = __webpack_require__(441);
var log4js = __webpack_require__(21);
var Helper1;
(function (Helper1) {
    function initializeLogger(Service1) {
        log4js.clearAppenders();
        log4js.loadAppender(&quot;ajaxLogAppender&quot;, ajaxLogAppender);
        log4js.addAppender(log4js.appenders.ajaxLogAppender({ type: 'ajaxLogAppender', category: 'corp', logService: Service1, logInConsole: true }), 'corp');
        var logger = log4js.getLogger('corp');
        logger.setLevel('info');
    }
    Helper1.initializeLogger = initializeLogger;
})(Helper1 = exports.Helper1 || (exports.Helper1 = {}));
exports.logger = log4js.getLogger('corp');

/***/ }),"><pre class="notranslate"><code class="notranslate">/* 445 */
/***/ (function(module, exports, __webpack_require__) {


var LogAppender = __webpack_require__(441);
var log4js = __webpack_require__(21);
var Helper1;
(function (Helper1) {
    function initializeLogger(Service1) {
        log4js.clearAppenders();
        log4js.loadAppender("ajaxLogAppender", ajaxLogAppender);
        log4js.addAppender(log4js.appenders.ajaxLogAppender({ type: 'ajaxLogAppender', category: 'corp', logService: Service1, logInConsole: true }), 'corp');
        var logger = log4js.getLogger('corp');
        logger.setLevel('info');
    }
    Helper1.initializeLogger = initializeLogger;
})(Helper1 = exports.Helper1 || (exports.Helper1 = {}));
exports.logger = log4js.getLogger('corp');

/***/ }),
</code></pre></div>
<p dir="auto"><strong>and the second occurance:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* 464 */
/***/ (function(module, exports, __webpack_require__) {


var LogAppender = __webpack_require__(460);
var log4js = __webpack_require__(21);
var Helper1;
(function (Helper1) {
    function initializeLogger(Service1) {
        log4js.clearAppenders();
        log4js.loadAppender(&quot;ajaxLogAppender&quot;, ajaxLogAppender);
        log4js.addAppender(log4js.appenders.ajaxLogAppender({ type: 'ajaxLogAppender', category: 'corp', logService: Service1, logInConsole: true }), 'corp');
        var logger = log4js.getLogger('corp');
        logger.setLevel('info');
    }
    Helper1.initializeLogger = initializeLogger;
})(Helper1 = exports.Helper1 || (exports.Helper1 = {}));
exports.logger = log4js.getLogger('corp');

/***/ }),"><pre class="notranslate"><code class="notranslate">/* 464 */
/***/ (function(module, exports, __webpack_require__) {


var LogAppender = __webpack_require__(460);
var log4js = __webpack_require__(21);
var Helper1;
(function (Helper1) {
    function initializeLogger(Service1) {
        log4js.clearAppenders();
        log4js.loadAppender("ajaxLogAppender", ajaxLogAppender);
        log4js.addAppender(log4js.appenders.ajaxLogAppender({ type: 'ajaxLogAppender', category: 'corp', logService: Service1, logInConsole: true }), 'corp');
        var logger = log4js.getLogger('corp');
        logger.setLevel('info');
    }
    Helper1.initializeLogger = initializeLogger;
})(Helper1 = exports.Helper1 || (exports.Helper1 = {}));
exports.logger = log4js.getLogger('corp');

/***/ }),
</code></pre></div>
<p dir="auto">**when the route is static route to component like this: (import { Helper1 } from 'App/Core/Common/Helper1') then the occurence is only one, but when I import it like this:<br>
(import { Helper1 } from 'Core') it does multiple occurences in the final bundle.<br>
**</p>
<p dir="auto">I've tried to add the dedupe plugin in webpack.config / it does some optimization but it does not solve the duplication of my components (in some sites there is information that dedupe is deprecated in webpack 2. is it realy deprecated or not?). Tried also the commonchunks plugin.</p>
<p dir="auto"><strong>Do you want to request a feature or report a bug?</strong><br>
Bug</p>
<p dir="auto"><strong>What is the current behavior?</strong><br>
When used with commonsChunk with <code class="notranslate">async:true</code> and <code class="notranslate">children:true</code> I get a message that I have missing dependencies in all the folders specified in the <code class="notranslate">resolve.alias</code> config.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
Using laravel-mix for setting up webpack.<br>
My two entries are:<br>
'resources/assets/js/app.js'<br>
'resources/assets/js/admin.js'<br>
config: <a href="https://gist.github.com/dobromir-hristov/546c4cc0d321e6c6ca3486d89fa766b9">https://gist.github.com/dobromir-hristov/546c4cc0d321e6c6ca3486d89fa766b9</a></p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
Should be able to find the aliased files.</p>
<p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.</strong><br>
Node - 6.9.1<br>
Webpack 3.2.0, 3.3.0<br>
Windows 10</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9863944/28641253-409a392a-7257-11e7-8970-a5bdcee07f78.png"><img src="https://user-images.githubusercontent.com/9863944/28641253-409a392a-7257-11e7-8970-a5bdcee07f78.png" alt="127 0 0 1-8888-" style="max-width: 100%;"></a></p>