<p dir="auto">Hi,</p>
<p dir="auto">What needs to be done to get only one source map to show and used for debugging. Currently there are two being created, the one being the es6 file and the other the transpiled one. (see image below.) Here is my config file:</p>
<p dir="auto">var path = require('path'),<br>
webpack = require("webpack"),<br>
libPath = path.join(__dirname, '/modules/authentication/init'),<br>
wwwPath = path.join(__dirname, 'build'),<br>
pkg = require('./package.json'),<br>
HtmlWebpackPlugin = require('html-webpack-plugin');</p>
<p dir="auto">var ngAnnotatePlugin = require('ng-annotate-webpack-plugin');</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="console.log(__dirname);
console.log(path.join(__dirname, '/modules/configuration'));"><pre class="notranslate"><code class="notranslate">console.log(__dirname);
console.log(path.join(__dirname, '/modules/configuration'));
</code></pre></div>
<p dir="auto">var config = {<br>
entry: path.join(libPath, 'init.js'),<br>
debug: true,<br>
devtool: '#inline-source-map',<br>
output: {<br>
path: path.join(wwwPath),<br>
filename: 'bundle-[hash:6].js'<br>
},<br>
recursive: true,<br>
resolve: {<br>
alias: {</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        /*'configuration-module': path.resolve(__dirname, './modules/configuration/configuration-module.js'),
        'global-module': path.resolve(__dirname, './modules/global/global-module.js'),
        //'angular-recaptcha': path.resolve(__dirname, './modules/global/services/angular-recaptcha.js'),
        //'angular-local-storage': path.resolve(__dirname, './modules/global/services/angular-local-storage.js'),
        'system-init': path.resolve(__dirname, './modules/system/default/init/system-init.js'),
        'authentication-service': path.resolve(__dirname, './modules/authentication/services/authentication-service.js'),
        'authentication-inteceptor-service': path.resolve(__dirname, './modules/authentication/services/authentication-inteceptor-service.js'),
        'authentication-facebook-service': path.resolve(__dirname, './modules/authentication/services/authentication-facebook-service.js'),
        'facebook-login-controller': path.resolve(__dirname, './modules/authentication/controllers/facebook-login-controller.js')*/

    }
},
module: {
    loaders: [
    {
        test: /\.html$/,
        loader: 'file?name=templates/[name]-[hash:6].html'
    }, { 
        test: /\.(woff|woff2|eot|ttf|svg)$/, 
        loader: 'file-loader?name=[path][name].[ext]' 
    }, {
        test: /\.(png|jpg)$/,
        loader: 'file?name=[path][name]-[hash:6].[ext]' // inline base64 URLs for &lt;=10kb images, direct URLs for the rest
    }, {
        test: /\.css$/,
        loader: &quot;style!css!autoprefixer&quot;
    }, {
        test: /\.scss$/,
        loader: &quot;style!css!autoprefixer!sass&quot;
    }, {
        test: /\.js$/,
        exclude: /(node_modules)/,
        loader: &quot;ng-annotate?add=true!babel?presets[]=es2015&quot;
    }]
},
plugins: [
    // HtmlWebpackPlugin: Simplifies creation of HTML files to serve your webpack bundles : https://www.npmjs.com/package/html-webpack-plugin
    new HtmlWebpackPlugin({
        filename: 'index.html',
        pkg: pkg,
        template: path.join(libPath, 'index.html')
    }),
    new ngAnnotatePlugin({
        add: true,
        // other ng-annotate options here 
    }),
    // OccurenceOrderPlugin: Assign the module and chunk ids by occurrence count. : https://webpack.github.io/docs/list-of-plugins.html#occurenceorderplugin


    // Deduplication: find duplicate dependencies &amp; prevents duplicate inclusion : https://github.com/webpack/docs/wiki/optimization#deduplication
    new webpack.optimize.DedupePlugin()
]"><pre class="notranslate"><code class="notranslate">        /*'configuration-module': path.resolve(__dirname, './modules/configuration/configuration-module.js'),
        'global-module': path.resolve(__dirname, './modules/global/global-module.js'),
        //'angular-recaptcha': path.resolve(__dirname, './modules/global/services/angular-recaptcha.js'),
        //'angular-local-storage': path.resolve(__dirname, './modules/global/services/angular-local-storage.js'),
        'system-init': path.resolve(__dirname, './modules/system/default/init/system-init.js'),
        'authentication-service': path.resolve(__dirname, './modules/authentication/services/authentication-service.js'),
        'authentication-inteceptor-service': path.resolve(__dirname, './modules/authentication/services/authentication-inteceptor-service.js'),
        'authentication-facebook-service': path.resolve(__dirname, './modules/authentication/services/authentication-facebook-service.js'),
        'facebook-login-controller': path.resolve(__dirname, './modules/authentication/controllers/facebook-login-controller.js')*/

    }
},
module: {
    loaders: [
    {
        test: /\.html$/,
        loader: 'file?name=templates/[name]-[hash:6].html'
    }, { 
        test: /\.(woff|woff2|eot|ttf|svg)$/, 
        loader: 'file-loader?name=[path][name].[ext]' 
    }, {
        test: /\.(png|jpg)$/,
        loader: 'file?name=[path][name]-[hash:6].[ext]' // inline base64 URLs for &lt;=10kb images, direct URLs for the rest
    }, {
        test: /\.css$/,
        loader: "style!css!autoprefixer"
    }, {
        test: /\.scss$/,
        loader: "style!css!autoprefixer!sass"
    }, {
        test: /\.js$/,
        exclude: /(node_modules)/,
        loader: "ng-annotate?add=true!babel?presets[]=es2015"
    }]
},
plugins: [
    // HtmlWebpackPlugin: Simplifies creation of HTML files to serve your webpack bundles : https://www.npmjs.com/package/html-webpack-plugin
    new HtmlWebpackPlugin({
        filename: 'index.html',
        pkg: pkg,
        template: path.join(libPath, 'index.html')
    }),
    new ngAnnotatePlugin({
        add: true,
        // other ng-annotate options here 
    }),
    // OccurenceOrderPlugin: Assign the module and chunk ids by occurrence count. : https://webpack.github.io/docs/list-of-plugins.html#occurenceorderplugin


    // Deduplication: find duplicate dependencies &amp; prevents duplicate inclusion : https://github.com/webpack/docs/wiki/optimization#deduplication
    new webpack.optimize.DedupePlugin()
]
</code></pre></div>
<p dir="auto">};</p>
<p dir="auto">module.exports = config;</p>
<p dir="auto">Any help will be greatly appreciated.</p>
<p dir="auto">Thanks :)</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12214559/13229415/859c242c-d9a9-11e5-85a0-3b084c48a92e.png"><img src="https://cloud.githubusercontent.com/assets/12214559/13229415/859c242c-d9a9-11e5-85a0-3b084c48a92e.png" alt="webpack" style="max-width: 100%;"></a></p>
<h1 dir="auto">Bug report</h1>




<p dir="auto">Minimal repro:<br>
<a href="https://github.com/Bnaya/webpack5-twice-compile-why">https://github.com/Bnaya/webpack5-twice-compile-why</a></p>
<p dir="auto"><strong>What is the current behavior?</strong><br>
Run the project <a href="https://github.com/Bnaya/webpack5-twice-compile-why">https://github.com/Bnaya/webpack5-twice-compile-why</a> on a mac machine<br>
(yarn &amp;&amp; yarn start)<br>
After the initial compile, open <code class="notranslate">src/index.js</code> and hit save.</p>
<p dir="auto">You will see that webpack rebuild the project twice.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>






<p dir="auto"><strong>What is the expected behavior?</strong></p>


<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version:   5.69.1<br>
webpack-cli: 4.9.2<br>
Node.js version: (14, 16)<br>
Operating System: macos 12.2.1</p>