Skip to content

Sourcemap has incorrect source attr for civet file in node_modules package #1784

@greghuc

Description

@greghuc

As discussed on Discord..

The esbuild+unplugin generated sourcemap has an incorrect source attribute for a civet file imported from a node_modules package:

  • Bad: "../node_modules/civet-pkg/lib/node_modules/civet-pkg/lib/math.civet"
  • Should be: "../node_modules/civet-pkg/lib/math.civet"

As requested, I put together a demo repo: https://github.com/greghuc/civet-sourcemaps-bug

Check out the current source map in build/index.js.map. I also added a non-civet package as a dependency, so you can see how a vanilla js file appears in sourcemap sources

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions