Skip to content

Node.js based forum software built for the modern web

fixed mapping in web inspector

Julian Lamce8bec5edb5e
diff --git a/minifier.js b/minifier.js
index 5418659e16..3bd306a07c 100644
--- a/minifier.js
+++ b/minifier.js
@@ -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 {
diff --git a/src/meta/js.js b/src/meta/js.js
index 4f0a94f187..3476f891da 100644
--- a/src/meta/js.js
+++ b/src/meta/js.js
@@ -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;