mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
fixed mapping in web inspector
This commit is contained in:
@@ -24,7 +24,7 @@ Minifier.js.minify = function (scripts, minify, callback) {
|
||||
options.outSourceMap = 'nodebb.min.js.map';
|
||||
options.mangle = false;
|
||||
options.compress = false;
|
||||
// options.prefix = __dirname.split(path.sep).length;
|
||||
options.prefix = 1;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -126,7 +126,7 @@ module.exports = function(Meta) {
|
||||
}, function(err) {
|
||||
// Translate into relative paths
|
||||
Meta.js.scripts = Meta.js.scripts.map(function(script) {
|
||||
return path.relative(path.resolve(__dirname, '../../'), script).replace(/\\/g, '/');
|
||||
return path.relative(path.resolve(__dirname, '../..'), script).replace(/\\/g, '/');
|
||||
});
|
||||
|
||||
Meta.js.prepared = true;
|
||||
|
||||
Reference in New Issue
Block a user