Previously the generated files were cleaned out before doc-gen began (via a yarn pre-script). This can cause a race condition in the CLI server, which prevents the new generated files from being picked up. Now we delay the cleaning until the last minute to ensure that they ar still picked up by the webpack server. PR Close #21540
		
			
				
	
	
		
			11 lines
		
	
	
		
			261 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			261 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const rimraf = require('rimraf');
 | |
| module.exports = function cleanGeneratedFiles() {
 | |
|   return {
 | |
|     $runAfter: ['writing-files'],
 | |
|     $runBefore: ['writeFilesProcessor'],
 | |
|     $process: function() {
 | |
|       rimraf.sync('src/generated/{docs,*.json}');
 | |
|     }
 | |
|   };
 | |
| };
 |