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

Add onComponentInstanceCreated constructor option #892

Merged
merged 1 commit into from May 26, 2020

Conversation

rchl
Copy link
Contributor

@rchl rchl commented May 26, 2020

Takes listener function that will be called when component-local
instance of VueI18n is created.

This allows for extending component-local VueI18n instances. Those are
created when Vue component specifies i18n options in an "i18n" property
as a plain object.

This allows Nuxt to also extend those instances in addition to extending
the root instance, so that there are no missing properties that would
cause users code to crash.

Fixes #887

Takes listener function that will be called when component-local
instance of VueI18n is created.

This allows for extending component-local VueI18n instances. Those are
created when Vue component specifies i18n options in an "i18n" property
as a plain object.

This allows Nuxt to also extend those instances in addition to extending
the root instance, so that there are no missing properties that would
cause users code to crash.

Fixes kazupon#887
Copy link
Owner

@kazupon kazupon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR!
LGTM! 👍

@kazupon kazupon added the Type: Feature Includes new features label May 26, 2020
@kazupon kazupon merged commit 885637f into kazupon:v8.x May 26, 2020
@rchl rchl deleted the feat/component-local-instance-created branch May 26, 2020 18:23
@rchl
Copy link
Contributor Author

rchl commented May 26, 2020

Sorry but I've noticed that types fail in my local setup. Not sure why are they not failing on CI.
I'm now reading into Flow documentation to see how to fix that.
I wish this would be written in TS :)

@kazupon
Copy link
Owner

kazupon commented May 26, 2020

no problem!
I'll fix it! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged Type: Feature Includes new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow extending vue-i18n instance created when handling custom blocks
2 participants