UNPKG

@nx/angular

Version:

The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: - Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypre

14 lines (13 loc) 723 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseASTOfWebpackConfig = parseASTOfWebpackConfig; const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript"); function parseASTOfWebpackConfig(tree, pathToWebpackConfig) { if (!tree.exists(pathToWebpackConfig)) { throw new Error(`Cannot migrate webpack config at \`${pathToWebpackConfig}\` as it does not exist. Please ensure this file exists and that the path to the file is correct.`); } (0, ensure_typescript_1.ensureTypescript)(); const { tsquery } = require('@phenomnomnominal/tsquery'); const source = tree.read(pathToWebpackConfig, 'utf-8'); return tsquery.ast(source); }