Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue Extractor should report errors if not able to parse/compile file #1627

Open
thekip opened this issue Apr 27, 2023 · 0 comments
Open

Vue Extractor should report errors if not able to parse/compile file #1627

thekip opened this issue Apr 27, 2023 · 0 comments

Comments

@thekip
Copy link
Collaborator

thekip commented Apr 27, 2023

Current implementation https://github.com/lingui/js-lingui/blob/main/packages/extractor-vue/src/vue-extractor.ts simply ignoring all errors reported by Vue compiler. This could be a problem, because file would be silently ignored without properly notifying the user.

const { descriptor, /* errors */ } = parse(code, {})

const compiledTemplate = compileTemplate()

/** compiledTemplate.errors **/

Both parse and compileTemplate returns array of errors, they should be picked up and thrown from the extractor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants