这是indexloc提供的服务,不要输入任何密码
Skip to content

Option sourcemap: 'inline' not working #495

@fox1t

Description

@fox1t

Hi!
As per documentation it should be possible to pass inline as sourcemap 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#L134

Moreover, 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 that external 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.

...
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
//# sourceMappingURL=input.js.map

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions