feat: allow changing requirejs base url

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 9df871bee2
commit c4829fd8c2

@ -1,7 +1,7 @@
'use strict';
require.config({
baseUrl: config.relative_path + '/assets/src/modules',
baseUrl: config.requireBaseUrl,
waitSeconds: 0,
urlArgs: config['cache-buster'],
paths: {

@ -19,6 +19,7 @@ apiController.loadConfig = async function (req) {
let config = {
relative_path: nconf.get('relative_path'),
upload_url: nconf.get('upload_url'),
requireBaseUrl: nconf.get('relative_path') + '/assets/src/modules',
siteTitle: validator.escape(String(meta.config.title || meta.config.browserTitle || 'NodeBB')),
browserTitle: validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB')),
titleLayout: (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}'),

Loading…
Cancel
Save