diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index 51a07ab9aa..66ae581ca4 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -18,6 +18,7 @@ var LONG_SOCKET_TIMEOUT = 120*1000; WebApp = {}; WebAppInternals = {}; +var bundledJsCssPrefix; var makeAppNamePathPrefix = function (appName) { return encodeURIComponent(appName).replace(/\./g, '_'); @@ -528,6 +529,11 @@ var runWebAppServer = function () { /##ROOT_URL_PATH_PREFIX##/g, __meteor_runtime_config__.ROOT_URL_PATH_PREFIX || ""); + boilerplateHtml = boilerplateHtml.replace( + /##BUNDLED_JS_CSS_PREFIX##/g, + bundledJsCssPrefix || + __meteor_runtime_config__.ROOT_URL_PATH_PREFIX || ""); + // only start listening after all the startup code has run. var localPort = parseInt(process.env.PORT) || 0; var host = process.env.BIND_IP; @@ -707,3 +713,7 @@ WebAppInternals.inlineScriptsAllowed = function () { WebAppInternals.setInlineScriptsAllowed = function (value) { inlineScriptsAllowed = value; }; + +WebAppInternals.setBundledJsCssPrefix = function (prefix) { + bundledJsCssPrefix = prefix; +}; diff --git a/tools/bundler.js b/tools/bundler.js index 54c54b735e..966deb6610 100644 --- a/tools/bundler.js +++ b/tools/bundler.js @@ -782,13 +782,13 @@ _.extend(ClientTarget.prototype, { '\n' + '
\n'); _.each(self.css, function (css) { - html.push(' \n'); }); html.push('\n\n##RUNTIME_CONFIG##\n\n'); _.each(self.js, function (js) { - html.push(' \n'); });