The resolution context, reading build configs from disk rather than the file cache.
()
| 3588 | |
| 3589 | /** The resolution context, reading build configs from disk rather than the file cache. */ |
| 3590 | private diskContext(): ResolutionContext { |
| 3591 | return { |
| 3592 | ...this.context, |
| 3593 | readFile: (filePath: string) => { |
| 3594 | try { |
| 3595 | const abs = path.join(this.projectRoot, filePath); |
| 3596 | return fs.statSync(abs).isFile() ? fs.readFileSync(abs, 'utf-8') : null; |
| 3597 | } catch { |
| 3598 | return null; |
| 3599 | } |
| 3600 | }, |
| 3601 | }; |
| 3602 | } |
| 3603 | |
| 3604 | /** |
| 3605 | * Get detected frameworks |
no test coverage detected