Skip to content

Is source-map-loader necessary for the typescript example? #1257

Closed
@johnnyreilly

Description

@johnnyreilly

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...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions