Source maps only work for dist builds.

Description

When the source maps are generated they are provided with a root option. The root is set to "../" which works for dist builds because they are in the "dist" directory and refer to files that are in the "src" directory. However with package builds (e.g. npm run build:pkg), the src directory is a direct sibling of the concatenated file. In this case root should be "".

Two potential solutions:

  1. Copy src into dist, so that the root can always be ""

  2. Make the root option configurable through buildModules.js's api so that dist builds and package builds can specify a different root value. 

Environment

None

Activity

Show:

Ned Zimmerman May 10, 2021 at 8:52 PM

If I'm understanding this correctly I think that gracefully handling different root options through the buildModules.js API (option 2) would be preferable— putting `src` into `dist` seems potentially confusing.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created May 10, 2021 at 7:03 PM
Updated July 22, 2024 at 2:35 PM
Resolved June 21, 2021 at 4:27 PM