UNPKG

@procore/core-scripts

Version:

A CLI to enhance your development experience

23 lines 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.configFactory = configFactory; const tslib_1 = require("tslib"); const webpack_chain_1 = tslib_1.__importDefault(require("webpack-chain")); const paths_1 = require("../../paths"); const setupWebpack_1 = require("./setupWebpack"); function configFactory(opts) { var _a, _b, _c, _d; const config = new webpack_chain_1.default(); const publicUrl = (0, paths_1.withoutSlash)(opts.publicPath); const entries = (_b = (_a = opts.workspace.procoreConfig.app) === null || _a === void 0 ? void 0 : _a.entry) !== null && _b !== void 0 ? _b : { index: 'index' }; const webpackOverride = (_d = (_c = opts.workspace.procoreConfig.app) === null || _c === void 0 ? void 0 : _c.webpackOverride) !== null && _d !== void 0 ? _d : Function.prototype; (0, setupWebpack_1.setupWebpack)(config, { ...opts, entries, publicUrl, profile: false, }); webpackOverride(config); return config; } //# sourceMappingURL=index.js.map