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