-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Parsing of language file fails when using functions #1680
Labels
Status: Review Needed
Request for review comments
Comments
It seems to be an even deeper issue, you can't use functions at all... If I define the function in the file itself, vite crashes with a 500. It works if I remove the local function. // import
import { someFunc } from '~/lib/someFunc` // This crashes Vite
// local
const someFunc = () => 'hello' // Calling this crashes Vite (someFunc is not defined).
export default {
test: () => someFunc()
} |
TheDutchCoder
changed the title
Parsing of language file fails on function parameter destructuring
Parsing of language file fails when using functions
Aug 1, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reporting a bug?
Consider the following two function calls:
locationName(named('pointOfInterest'), false)
locationName({ pointOfInterest: named('pointOfInterest'), includeParent: false })
With origin2:
The former can be used in a locale file and works fine, but the latter will fail parsing and will add part of the function call at the end of the parsed string:
Expected behavior
foo({ a: 'a' })
to be compiled correctlyReproduction
Fiddle doesn't work ("Uncaught ReferenceError: VueI18n is not defined")
System Info
Screenshot
See main issue
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: