|
1 | 1 | import type { ParsedArgs } from 'minimist'; |
2 | 2 | import type { IsPluginEnabled, Plugin, ResolveConfig } from '../../types/config.js'; |
3 | 3 | import { compact } from '../../util/array.js'; |
4 | | -import { toDependency } from '../../util/input.js'; |
| 4 | +import { toConfig, toDependency } from '../../util/input.js'; |
5 | 5 | import { hasDependency } from '../../util/plugin.js'; |
6 | 6 | import type { NxConfigRoot, NxProjectConfiguration } from './types.js'; |
7 | 7 |
|
@@ -68,7 +68,36 @@ const resolveConfig: ResolveConfig<NxProjectConfiguration | NxConfigRoot> = asyn |
68 | 68 |
|
69 | 69 | const inputs = options.getInputsFromScripts(scripts); |
70 | 70 |
|
71 | | - return compact([...executors, ...inputs]).map(id => (typeof id === 'string' ? toDependency(id) : id)); |
| 71 | + const configInputs = targets.flatMap(target => { |
| 72 | + const opts = target.options; |
| 73 | + if (!opts) return []; |
| 74 | + |
| 75 | + const configs = []; |
| 76 | + |
| 77 | + if ('eslintConfig' in opts && typeof opts.eslintConfig === 'string') { |
| 78 | + configs.push(toConfig('eslint', opts.eslintConfig)); |
| 79 | + } |
| 80 | + |
| 81 | + if ('jestConfig' in opts && typeof opts.jestConfig === 'string') { |
| 82 | + configs.push(toConfig('jest', opts.jestConfig)); |
| 83 | + } |
| 84 | + |
| 85 | + if ('tsConfig' in opts && typeof opts.tsConfig === 'string') { |
| 86 | + configs.push(toConfig('typescript', opts.tsConfig)); |
| 87 | + } |
| 88 | + |
| 89 | + if ('vitestConfig' in opts && typeof opts.vitestConfig === 'string') { |
| 90 | + configs.push(toConfig('vitest', opts.vitestConfig)); |
| 91 | + } |
| 92 | + |
| 93 | + if ('webpackConfig' in opts && typeof opts.webpackConfig === 'string') { |
| 94 | + configs.push(toConfig('webpack', opts.webpackConfig)); |
| 95 | + } |
| 96 | + |
| 97 | + return configs; |
| 98 | + }); |
| 99 | + |
| 100 | + return compact([...executors, ...inputs, ...configInputs]).map(id => (typeof id === 'string' ? toDependency(id) : id)); |
72 | 101 | }; |
73 | 102 |
|
74 | 103 | const args = { |
|
0 commit comments