import { loader } from 'webpack' ; import { Terminal } from '@rushstack/node-core-library' ; import { ILocalizationFile } from '../interfaces' ; import { LocFileParser } from '../utilities/LocFileParser' ; import { loaderFactory , IBaseLoaderOptions } from './LoaderFactory' ; import { LoaderTerminalProvider } from '../utilities/LoaderTerminalProvider' ; export default loaderFactory ( function ( this , locFilePath , content , options ) { const locFileData = LocFileParser . parseLocFile ( { content , filePath : locFilePath , terminal : new Terminal ( LoaderTerminalProvider . getTerminalProviderForLoader ( this ) ) , resxNewlineNormalization : options . resxNewlineNormalization } ) ; const resultObject = { } ; for ( const [ stringName , stringValue ] of Object . entries ( locFileData ) ) { resultObject [ stringName ] = stringValue . value ; } return resultObject ; } ) ;