Skip to content

Relative paths in source maps #93

@byelims

Description

@byelims

I'm trying to switch from jsx-loader. My webpack.config.js is like this:

module.exports = {
  entry: './src/javascript/main.jsx',
  output: {
    devtoolModuleFilenameTemplate: '[resource-path]',
    path: './public/js/',
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      { test: /\.jsx$/, loaders: ['jsx'] }
    ]
  }
};

This will produce relative paths in source maps.

{
  sources: ["./src/javascript/main.jsx"]
}

If I use babel-loader with the same config, it will produce absolute paths.

{
  sources: ["/full/path/src/javascript/main.jsx"]
}

Are there any methods to solve this problem?

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