fix: make sourcemap base prefix relative from outdir to the build file instead of static "../" (fixes #1253)#1254
Conversation
… default "../" (fixes vercel#1253)
2464f3d to
7e2b6d3
Compare
styfle
left a comment
There was a problem hiding this comment.
Thanks, can you add a test to confirm this works?
Yes, I'll give it a try |
|
@styfle added relevant tests 3 unrelated integration tests fail for me locally both in my branch and in up to date main branch. These are the tests and corresponding errors:
I assume its because |
|
how does it look? |
last time around all but few unrelated tests were passing, see more in the prev comment #1254 (comment) let me check now |
|
I believe the test dont work no more, because suggested change broke them =) |
|
I see. I guess we can try the old code but it didn't seem right. Would't it trim the wrong character if it didn't end with a |
|
yes, probably. but I think this thing is a crutch. we should adjust webpack configuration so it generates sourcemaps relative to the source to begin with |
|
I gonna give it a go |
should address issue described in #1253
I was also thinking to expose sourcemap base prefix as an ncc argument in case there are more bugs or edge cases and some people will require manual adjustment, but decided to start small