@@ -208,7 +208,7 @@ export default class I18nextPlugin {
208
208
209
209
try {
210
210
await Promise . all ( _ . flatten ( _ . map ( this . option . languages , async lng => {
211
- const resourceTemplate = path . join ( this . context , getPath ( this . option . resourcePath , lng ) ) ;
211
+ const resourceTemplate = path . resolve ( this . context , getPath ( this . option . resourcePath , lng ) ) ;
212
212
const resourceDir = path . dirname ( resourceTemplate ) ;
213
213
if ( ! exists ( resourceDir ) ) {
214
214
compilation . missingDependencies . push ( resourceDir ) ;
@@ -253,7 +253,7 @@ export default class I18nextPlugin {
253
253
// write missing
254
254
await this . initMissingDir ( ) ;
255
255
await Promise . all ( _ . map ( this . missingKeys , async ( namespaces , lng ) => {
256
- const resourceTemplate = path . join ( this . context , getPath ( this . option . pathToSaveMissing , lng ) ) ;
256
+ const resourceTemplate = path . resolve ( this . context , getPath ( this . option . pathToSaveMissing , lng ) ) ;
257
257
const resourceDir = path . dirname ( resourceTemplate ) ;
258
258
try {
259
259
await mkdir ( resourceDir ) ;
@@ -274,7 +274,7 @@ export default class I18nextPlugin {
274
274
stream . write ( _ . map (
275
275
keys ,
276
276
key => `\t"${ key } ": [\n${ _ . map (
277
- values [ key ] , ( pos , module ) => `\t\t"${ _ . trim ( JSON . stringify ( path . relative ( this . context , module ) ) , '"' ) } (${ pos } )"` ) . join ( "\n" )
277
+ values [ key ] , ( pos , module ) => `\t\t"${ _ . trim ( JSON . stringify ( path . relative ( this . context , module ) ) , '"' ) } (${ pos } )"` ) . join ( ", \n" )
278
278
} \n\t]`) . join ( ",\n" )
279
279
) ;
280
280
stream . end ( "\n}" ) ;
@@ -286,7 +286,7 @@ export default class I18nextPlugin {
286
286
// remove previous missings
287
287
await Promise . all ( _ . map ( remains , async ( namespaces , lng ) =>
288
288
_ . map ( namespaces , async ( __ , ns ) => {
289
- const missingPath = path . join ( this . context , getPath ( this . option . pathToSaveMissing , lng , ns ) ) ;
289
+ const missingPath = path . resolve ( this . context , getPath ( this . option . pathToSaveMissing , lng , ns ) ) ;
290
290
if ( await exists ( missingPath ) ) {
291
291
await unlink ( missingPath ) ;
292
292
}
0 commit comments