1.0.6 • Published 1 year ago

where2cut v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

howToUse

cutjs

适合没有 Source Map 只有源文件的场景报错

> cutjs path/to/error-file.js  1 18904 50
# path/to/error-file.js 需要 debug 的 js 文件
# 1    出错的行号
# 8904 出错的列号
# 50   出错位置前后展示多少个字符
minified Content:
n("Z/b0");function p(e){const t=Object(f["a"])(),[n,r]=Object(l["useState"])(e),o=Object(l["useCallback"])(e=>{t.current
                                                ^^^

view unminified Code:
/user/example/umi.unminify.js:989

执行后生成 unsource.js 格式化后的代码,和错误对应的文件位置信息,方便 debug。

wherejs

适合有 sourcemap 的场景

> wherejs path/to/file.js.map  1 276297
# path/to/file.js.map  压缩代码对应的 source map 文件
# 1                    压缩出错行号
# 276297               压缩出错列号

webpack:///node_modules/.pnpm/react-router@6.3.0_react@18.1.0/node_modules/react-router/index.js:1:276297 -> 73:21
1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago