Closed
Description
In the webpack / typescript documentation it says that the source-map-loader
is necessary for sourcemaps to work. I don't believe it is (I've been happily debugging TypeScript with sourcemaps and webpack for about 2 years now). I was just curious if I was missing anything? As far as I know this section:
module: {
rules: [
{
enforce: 'pre',
test: /\.js$/,
loader: "source-map-loader"
},
{
enforce: 'pre',
test: /\.tsx?$/,
use: "source-map-loader"
}
]
},
Isn't necessary at all.
You just need "sourceMap": true
in the tsconfig.json
and devtool: 'inline-source-map'
in the webpack.config.js
.
I just wanted to know if there was anything else source-map-loader
brings to the party? AFAIK this isn't required...