@@ -210,7 +210,7 @@ export default class I18nextPlugin {
210
210
await Promise . all ( _ . flatten ( _ . map ( this . option . languages , async lng => {
211
211
const resourceTemplate = path . resolve ( this . context , getPath ( this . option . resourcePath , lng ) ) ;
212
212
const resourceDir = path . dirname ( resourceTemplate ) ;
213
- if ( ! exists ( resourceDir ) ) {
213
+ if ( ! await exists ( resourceDir ) ) {
214
214
compilation . missingDependencies . push ( resourceDir ) ;
215
215
return [ ] ;
216
216
}
@@ -263,7 +263,7 @@ export default class I18nextPlugin {
263
263
}
264
264
}
265
265
266
- return _ . map ( namespaces , async ( values , ns ) => new Promise < void > ( resolve => {
266
+ return await Promise . all ( _ . map ( namespaces , ( values , ns ) => new Promise < void > ( resolve => {
267
267
delete remains [ lng ] [ ns ] ;
268
268
const missingPath = getPath ( resourceTemplate , undefined , ns ) ;
269
269
const stream = fs . createWriteStream ( missingPath , {
@@ -281,7 +281,7 @@ export default class I18nextPlugin {
281
281
stream . on ( "close" , ( ) => resolve ( ) ) ;
282
282
283
283
compilation . warnings . push ( `missing translation ${ _ . size ( values ) } keys in ${ lng } /${ ns } ` ) ;
284
- } ) ) ;
284
+ } ) ) ) ;
285
285
} ) ) ;
286
286
// remove previous missings
287
287
await Promise . all ( _ . map ( remains , ( namespaces , lng ) =>
0 commit comments