Skip to content

devtool: "source-map" how to pass publicPath option? #6216

@sarkiroka

Description

@sarkiroka

Do you want to request a feature or report a bug?
I don't know

What is the current behavior?
I try to use both of devtool: "source-map" option and this plugin: https://webpack.js.org/plugins/source-map-dev-tool-plugin/
But I cannot found a way to pass publicPath to sourceMap plugin when it defined in devtool.
When I use only the plugin:

	plugins: [
		new webpack.SourceMapDevToolPlugin({
			filename: '[file].map',
			publicPath: 'https://example.com/project/'
		}),
...

then it generated as well in javascript file, but the sourcemap file is empty:
{"version":3,"sources":[],"names":[],"mappings":"","file":"project.js","sourceRoot":""}

When I use only the devtools option, the sourcemap generated well, but I cannot set publicPath.
I want to set sourcemap to external server.

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

What is the expected behavior?
for example in output options I can specify the sourcemap publicPath option

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

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
node: 8.9.0
webpack 3.10.0
os: linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions