Currently, I am developing a TypeScript application (Angular 11) and using Webpack for code bundling. The issue I am facing is related to generating a source map with Webpack. While the source map is being generated for the JavaScript code as intended, it's not mapping back to the original TypeScript files properly. It seems like there might be an order of execution problem causing this issue. Despite adding the sourcemap tag correctly at the end of the JS file and verifying that the map loads correctly, I suspect there might be a configuration error on my part.
I must admit that I'm not very experienced with webpack configurations. The current setup has been adapted from previous projects that worked smoothly, so I may have missed something this time around. Any assistance in identifying the potential issue would be greatly appreciated. Thanks in advance.
Details:
Webpack 4.44.2
Typescript 4.0.5
Nodejs 12.20.1
Angular 11.0.6
Babel 7.12.10
const {AngularCompilerPlugin} = require('@ngtools/webpack');
...
}];
};