@nx/angular
Version:
18 lines (17 loc) • 730 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeOptions = normalizeOptions;
const angular_version_utils_1 = require("../../../executors/utilities/angular-version-utils");
function normalizeOptions(schema) {
const { major: angularMajorVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
return {
...schema,
host: schema.host ?? 'localhost',
port: schema.port ?? 4200,
liveReload: schema.liveReload ?? true,
hmr: schema.hmr ?? (angularMajorVersion < 19 ? false : undefined),
open: schema.open ?? false,
ssl: schema.ssl ?? false,
watchDependencies: schema.watchDependencies ?? true,
};
}