Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/react-server / dist / middleware / clientBundle.js
Size: Mime:
"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