mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 03:51:26 +01:00
no more hardcoding of the prefix value for minification mapping
This commit is contained in:
@@ -4,6 +4,7 @@ var uglifyjs = require('uglify-js'),
|
||||
less = require('less'),
|
||||
async = require('async'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
|
||||
Minifier = {
|
||||
js: {},
|
||||
@@ -19,7 +20,7 @@ Minifier.js.minify = function (scripts, minify, callback) {
|
||||
options.outSourceMap = 'nodebb.min.js.map';
|
||||
options.mangle = false;
|
||||
options.compress = false;
|
||||
options.prefix = 6;
|
||||
options.prefix = __dirname.split(path.sep).length;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user