Closed fox1t closed 2 years ago
inline sourcemap was removed and the docs should be updated, any specific reason you need inline sourcemap?
I am developing a custom tsup configuration that takes some paramters that tsup care about directly from the tsconfig.json. In particular:
Should we remove the inline
option test too?
Out of curiosity, why it was removed?
just did a bit research, there're indeed use cases for inline sourcemap (like developing browser extensions), we should bring it back, but it should be added in https://github.com/egoist/tsup/blob/d428ce7be1341fe7c8d6f745eaa0676f9eeeea89/src/plugin.ts#L160-L174, currently we perform some extra operations on the sourcemap output by esbuild and manually write it to disk
:tada: This issue has been resolved in version 5.11.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Hi! As per documentation it should be possible to pass
inline
assourcemap
option. In reality, passing it is treated the same as passing any other value thanks to this line: https://github.com/egoist/tsup/blob/dev/src/esbuild/index.ts#L134Moreover, the relative test is wrong too and doesn't catch this error. We can see that it is checking for the presence of at https://github.com/egoist/tsup/blob/dev/test/index.test.ts#L188 instead of the more safe
//# sourceMappingURL=data:
I've already had a fix, and I can open a PR, but there is just one last thing that bothers me.
esbuild
documentation says thatexternal
shouldn't add//# sourceMappingURL=
at the end of the file, but running this test and checking the output, shows a different story. Any clues?And this is why the
inline
test is passing even if the option is not working at the moment.Upvote & Fund