vue-i18n-locale-message icon indicating copy to clipboard operation
vue-i18n-locale-message copied to clipboard

CLI target option set to `.` will cause an error

Open antfu opened this issue 5 years ago • 1 comments

$ npx vue-i18n-locale-message squeeze --target=. --output=./translated.json
npx: installed 71 in 6.32s
Cannot read property 'split' of undefined

I suppose this is caused by this line: https://github.com/kazupon/vue-i18n-locale-message/blob/7f2e0af4dea7710788bb8bd81b573cb60c8bbccd/src/utils.ts#L42

While path.parse('.') returns { ..., dir: '' } which causes target become undefined

PS. using Windows here

antfu avatar Aug 29 '19 10:08 antfu

Thanks! feedback!

kazupon avatar Aug 30 '19 09:08 kazupon