Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/381.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 为什么Chrome会忽略我的JS源代码映射_Javascript_Google Chrome_Minify_Uglifyjs_Source Maps - Fatal编程技术网

Javascript 为什么Chrome会忽略我的JS源代码映射

Javascript 为什么Chrome会忽略我的JS源代码映射,javascript,google-chrome,minify,uglifyjs,source-maps,Javascript,Google Chrome,Minify,Uglifyjs,Source Maps,我正在尝试使用uglifyjs组合我的JS文件,它正在生成一个源映射。但是chrome甚至没有尝试加载地图,在堆栈跟踪中,显示了缩小的文件 这是我的源目录: js-min/ ← here should go the minified files js-src/ ├── app │   ├── dialog.js │   ├── jslang-data.js │   ├── jslang.js │   ├── planner.js │   ├── slider.js │   ├── timed

我正在尝试使用
uglifyjs
组合我的JS文件,它正在生成一个源映射。但是chrome甚至没有尝试加载地图,在堆栈跟踪中,显示了缩小的文件

这是我的源目录:

js-min/   ← here should go the minified files
js-src/
├── app
│   ├── dialog.js
│   ├── jslang-data.js
│   ├── jslang.js
│   ├── planner.js
│   ├── slider.js
│   ├── timed_refresh.js
│   ├── top_panel.js
│   └── utils.js
└── lib
    --snip--
这是我用来构建文件的脚本
app.min.js

# --- Output file ---
outfile="js-min/app.min.js"
outfile_map="js-min/app.min.js.map"

# --- Sources ---
src=""

src+=" js-src/app/utils.js" # contains core mods
src+=" js-src/app/timed_refresh.js"
src+=" js-src/app/jslang-data.js"
src+=" js-src/app/jslang.js"
src+=" js-src/app/dialog.js"
src+=" js-src/app/slider.js"
src+=" js-src/app/planner.js"

src+=" js-src/app/top_panel.js"

# sources variable is expanded to arguments
uglifyjs $src -o "$outfile" --compress --source-map "$outfile_map"
生成的源地图如下(略为缩短):

如果您想查看完整文件->


源地图有问题吗?我是不是用了错误的标志来表示丑陋的东西?

你知道问题出在哪里了吗?@theDminot不是真的,我想是chrome的错误。“那是很久以前的事了,我真的不记得它是否解决了。你有没有弄清楚问题出在哪里?@theDminot不太清楚,我想那是一些chrome bug。那是很久以前的事了,我真的不记得是否解决了
{
    "version": 3,
    "file": "js-min/app.min.js",
    "sources": ["js-src/app/utils.js", "js-src/app/timed_refresh.js", "js-src/app/jslang-data.js", "js-src/app/jslang.js", "js-src/app/dialog.js", "js-src/app/slider.js", "js-src/app/planner.js", "js-src/app/top_panel.js"],
    "names": ["String", "prototype", "format", "formatted", "this", "arguments", "length", "isArray", "i", "replace", "pad_num", "number", "len", "padchar", "pad_char", "pad", "Array", "join", "slice", "pad2", "Function", "bind", "parent", "f", "args", "a", "temp", "apply", ....],
    "mappings": "AAIAA,OAAOC,UAAUC,OAAS,WACzB,GAAIC,WAAYC,IAEhB,...."
}