SourceMapDevToolPlugin not generating a sourcemap

Do you want to request a feature or report a bug?

What is the current behavior?
option of devtool: "source-map" generates a correct source mapping

however adding SourceMapDevtoolPlugin to plugins array does not produce any source map (tested with the following options):

new webpack.SourceMapDevToolPlugin({
    filename: '[file].map',
    moduleFilenameTemplate: undefined,
    fallbackModuleFilenameTemplate: undefined,
    append: null,
    module: true,
    columns: true,
    lineToLine: false,
    noSources: false,
    namespace: '' 

I am not using any other plugins in my config files.

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

The full configs being used are available in the following gists:

Valid Source Map Config

No Source Map Config

What is the expected behavior?
They should produce the same mappings

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.
Node.js Version: v8.1.2
Webpack Version: 4.6.0
Webpack Cli: 2.0.15

Author: Fantashit

2 thoughts on “SourceMapDevToolPlugin not generating a sourcemap

  1. That worked, I went through the documentation multiple times but didn’t see that.

    my bad and thank you

Comments are closed.