Skip to content

Wrong path in sourcemap sources entry for chunks in assets dir #311

@dagroe

Description

@dagroe

ember-auto-import/webpack compiles vendor code into chunks in the assets directory in our project. Those files are then minimized using ember-cli-terser.

Since webpack is set to not build sourcemaps for those files, this plugin set the sources entry in the sourcemap to the relativePath of the file.

As an example, we get a sourcemap /assets/chunk.123.map with "sources": "assets/chunk.123.js". This leads to some issues where external tools try to read those maps, since they cannot find /assets/assets/chunk.123.js. Should it rather be "sources": "chunk.123.js" in this case since the path is relative and the map is already located at assets/?

I attempted a fix here: dagroe@5fe87d0

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