Issue 1:
Hi,

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:

var path = require('path'),

webpack = require("webpack"),

libPath = path.join(__dirname, '/modules/authentication/init'),

wwwPath = path.join(__dirname, 'build'),

pkg = require('./package.json'),

HtmlWebpackPlugin = require('html-webpack-plugin');

var ngAnnotatePlugin = require('ng-annotate-webpack-plugin');

console.log(__dirname);
console.log(path.join(__dirname, '/modules/configuration'));

var config = {

entry: path.join(libPath, 'init.js'),

debug: true,

devtool: '#inline-source-map',

output: {

path: path.join(wwwPath),

filename: 'bundle-[hash:6].js'

},

recursive: true,

resolve: {

alias: {

/*'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 <=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 & prevents duplicate inclusion : https://github.com/webpack/docs/wiki/optimization#deduplication
new webpack.optimize.DedupePlugin()
]

};

module.exports = config;

Any help will be greatly appreciated.

Thanks :)

Issue 2:
Bug report

Minimal repro:

https://github.com/Bnaya/webpack5-twice-compile-why

What is the current behavior?

Run the project https://github.com/Bnaya/webpack5-twice-compile-why on a mac machine

(yarn && yarn start)

After the initial compile, open src/index.js and hit save.

You will see that webpack rebuild the project twice.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Other relevant information:

webpack version: 5.69.1

webpack-cli: 4.9.2

Node.js version: (14, 16)

Operating System: macos 12.2.1