File tree Expand file tree Collapse file tree
webpack/localization-plugin/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,11 +58,7 @@ export class LocFilePreprocessor {
5858 FileSystem . ensureEmptyFolder ( this . _options . generatedTsFolder ) ;
5959
6060 const filesToIgnore : Set < string > = new Set < string > ( ( this . _options . filesToIgnore ! ) . map ( ( fileToIgnore ) => {
61- if ( path . isAbsolute ( fileToIgnore ) ) {
62- return fileToIgnore ;
63- } else {
64- return path . resolve ( this . _options . srcFolder , fileToIgnore ) ;
65- }
61+ return path . resolve ( this . _options . srcFolder , fileToIgnore ) ;
6662 } ) ) ;
6763
6864 const locJsonFilePaths : string [ ] = glob . sync (
@@ -113,7 +109,7 @@ export class LocFilePreprocessor {
113109 for ( const stringName in locFileData ) { // eslint-disable-line guard-for-in
114110 const { comment } = locFileData [ stringName ] ;
115111
116- if ( comment . trim ( ) ) {
112+ if ( comment && comment . trim ( ) !== '' ) {
117113 outputLines . push ( ...[
118114 '/**' ,
119115 ` * ${ comment . replace ( / \* \/ / g, '*\\/' ) } ` ,
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export interface ILocFile {
3434
3535export interface ILocalizedString {
3636 value : string ;
37- comment : string ;
37+ comment ? : string ;
3838}
3939
4040/**
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ export class ResxReader {
195195
196196 return {
197197 value,
198- comment : comment || ''
198+ comment
199199 } ;
200200 }
201201 }
You can’t perform that action at this time.
0 commit comments