@nxext/stencil
Version:
Nx plugin for stenciljs
22 lines • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateTsConfig = updateTsConfig;
const devkit_1 = require("@nx/devkit");
const js_1 = require("@nx/js");
const generator_1 = require("../../storybook-configuration/generator");
function updateTsConfig(host, options) {
(0, devkit_1.updateJson)(host, (0, js_1.getRootTsConfigPathInTree)(host), (json) => {
const c = json.compilerOptions;
const tsBasePathKey = options.importPath || (0, generator_1.getProjectTsImportPath)(host, options.name);
delete c.paths[`${tsBasePathKey}`];
c.paths[`${tsBasePathKey}`] = [`dist/libs/${options.name}`];
delete c.paths[`${tsBasePathKey}/loader`];
c.paths[`${tsBasePathKey}/loader`] = [`dist/libs/${options.name}/loader`];
delete c.paths[`${tsBasePathKey}/*`];
c.paths[`${tsBasePathKey}/*`] = [
`dist/libs/${options.name}/dist/components/*`,
];
return json;
});
}
//# sourceMappingURL=update-tsconfig.js.map