File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -188,14 +188,15 @@ export default class I18nextPlugin {
188
188
this . prevTimestamps = compilation . fileTimestamps ;
189
189
190
190
try {
191
- await Promise . all ( _ . map ( this . option . languages , lng => {
191
+ await Promise . all ( _ . flatten ( _ . map ( this . option . languages , async lng => {
192
192
const resourceTemplate = path . join ( this . context , getPath ( this . option . resourcePath , lng ) ) ;
193
193
const resourceDir = path . dirname ( resourceTemplate ) ;
194
194
if ( ! exists ( resourceDir ) ) {
195
195
compilation . missingDependencies . push ( resourceDir ) ;
196
+ return [ ] ;
196
197
}
197
198
198
- return _ . map ( this . option . namespaces , async ns => {
199
+ return Promise . all ( _ . map ( this . option . namespaces , async ns => {
199
200
const resourcePath = getPath ( resourceTemplate , undefined , ns ) ;
200
201
const outPath = getPath ( this . option . outPath , lng , ns ) ;
201
202
@@ -211,8 +212,8 @@ export default class I18nextPlugin {
211
212
compilation . missingDependencies . push ( resourcePath ) ;
212
213
compilation . warnings . push ( `Can't emit ${ outPath } . It looks like ${ resourcePath } is not exists.` ) ;
213
214
}
214
- } ) ;
215
- } ) ) ;
215
+ } ) ) ;
216
+ } ) ) ) ;
216
217
217
218
callback ( ) ;
218
219
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments