1import { writeFileSyncByString } from './ark_utils'; 2import { projectConfig } from '../main'; 3import { 4 ESMODULE, 5 ARK 6} from './pre_define'; 7import { logger } from './compile_info'; 8 9module.exports = function processSourcefile(source: string): string { 10 if (projectConfig.compileMode === ESMODULE && process.env.compilerType 11 && process.env.compilerType === ARK) { 12 writeFileSyncByString(this.resourcePath, source, projectConfig, logger); 13 } 14 return source; 15}; 16