Skip to content

Any way to keep the original filename in Dev Tools when using pitch loaders? #363

@gaearon

Description

@gaearon

Say I have two loaders:

  • react-hot-loader, a pitch loader (internally using a transforming loader, but that doesn't seem to change things, as I've got similar problems with bundle-loader which is purely pitch loader)
  • jsx-loader, a transforming loader

If I use just jsx-loader, filenames are preserved:

{ test: /\.jsx$/, loader: 'jsx' }

If I chain loaders, the filename corresponds to the "outer" pitching loader, and not to the source file:

{ test: /\.jsx$/, loader: 'react-hot!jsx' }

The original file (before the pitch) gets a long name, and devtools just call it jsx-loader in title which is highly inconvenient:

From my understanding, adding source maps won't help because the issue isn't in transforming code, but in resulting filenames.

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