Skip to content

CLI target option set to . will cause an error #10

@antfu

Description

@antfu
$ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions