Skip to content

Node.js based forum software built for the modern web

if dev, compile view scripts only; let rjs dynamically load module scripts

psychobunny70b5c631c6fe
diff --git a/src/meta/js.js b/src/meta/js.js
index 85dad13ab5..b8ce5e2bbf 100644
--- a/src/meta/js.js
+++ b/src/meta/js.js
@@ -54,10 +54,6 @@ module.exports = function(Meta) {
};
Meta.js.loadRJS = function(callback) {
- if (global.env === 'development') {
- return callback();
- }
-
var rjsPath = path.join(__dirname, '../../public/src');
async.parallel({
@@ -65,6 +61,10 @@ module.exports = function(Meta) {
utils.walk(path.join(rjsPath, 'client'), next);
},
modules: function(next) {
+ if (global.env === 'development') {
+ return next(null, []);
+ }
+
utils.walk(path.join(rjsPath, 'modules'), next);
}
}, function(err, rjsFiles) {