js - 我是否也需要为缩小的文件创建一个地图文件?

js - Do I Need to create a map file for minified files too?

我是 TreeJS. So far, I use TypeScript to generate the build file (plain browser-understandable JS), a Type Definitions file, and a map file for the unminified build. I use an external tool called Minify 的作者以缩小构建。

我的问题是,我是否也应该为缩小版本创建一个地图文件,或者未缩小版本的地图文件可以与缩小版本一起使用?

而且,如果我确实需要为此构建地图,有人知道任何工具吗?

因为它是您的 库,您不需要做任何您不想做的事情,但是源映射对您的用户来说可能是一个巨大的帮助。 Minify 使用 terser 来缩小 JavaScript 和 terser can generate composed source maps. I never worked with Minify, but it seems like you can pass map generated by typescript in options.