Skip to content

Combination of devtool: 'source-map' and library specified as Object throws error #6843

@swederik

Description

@swederik

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

What is the current behavior?
With the following configuration, webpack throws the following error

module.exports = {
  devtool: 'source-map',
  output: {
    library: {
      root: "MyLibrary",
      amd: "my-library",
      commonjs: "my-common-library"
    }
  }
}
ValidationError: SourceMap DevTool Plugin Invalid Options
options.namespace should be string

The bug is nearly identical to #6634, just for Object syntax for 'library' instead of Array. I am only creating a new ticket because that one is already closed. I have a fix incoming for this.

The docs specify that this is acceptable.
screenshot 2018-03-23 08 45 14

If the current behavior is a bug, please provide the steps to reproduce.
The proceeding config is enough to produce the issue.

What is the expected behavior?
The proceeding config should build without issue, as was the case with versions prior to 4.

If this is a feature request, what is motivation or use case for changing the behavior?
N/A

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.
4.2.0 (Previously working on 3.8.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions