Repository URL to install this package:
|
Version:
2.0.0-beta.20 ▾
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var path_1 = require("path");
var bs_1 = require("@skava/bs");
var express_1 = __importDefault(require("express"));
// also this is super weird because of webpack dev server not emitting the file
var expireSettings = {
// Cache-Control: private, max-age=604800
maxAge: process.env.BROWSER_MAX_CACHE_AGE,
index: false,
};
// actually am super confused here...
// dist/dist/bundled/client/
// but it has index.js
// so does it resolve only index......?
// often there is no file here (o.o) < webpack dev server keeps in memory
var clientBundleOutputPath = path_1.resolve(bs_1.config.get('appRootDir'), process.env.BUILD_CONFIG_WEB_OUTPUT_PATH);
exports.clientBundleOutputPath = clientBundleOutputPath;
/**
* Middleware to server our client bundle.
*
* @example
* /usr/project-here/dist/client
*/
var staticMiddleware = express_1.default.static(clientBundleOutputPath, expireSettings);
exports.staticMiddleware = staticMiddleware;
exports.clientBundle = staticMiddleware;
exports.default = staticMiddleware;
//# sourceMappingURL=clientBundle.js.map