The event bus approach to propagate Vue 2 events has certain problems in the way consumers are setup.
Currently Lume tries to access the default Vue instance and then uses it to instantiate event bus.
The Vue instance in Lume is accessed in the following way:
const Vue = (await import('vue')).default;
But this way may not be okay for Vue 2 with webpack bundler consumer and it expects the Vue default component to be available as below:
const Vue = (await import('vue')).default.default;
To get rid of this all together, its better to not have to use event bus itself and replace it with custom events.
Reproduction URL
No response
Reproduction steps
Access the Lume consumer with Vue 2 webpack bundler - on every hover of bar chart we see the following console error:
Expected behavior
Should be able to listen to the internal events from the root and the console error should no longer occur.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Lume issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Problem description
The event bus approach to propagate Vue 2 events has certain problems in the way consumers are setup.
Currently Lume tries to access the default Vue instance and then uses it to instantiate event bus. The Vue instance in Lume is accessed in the following way:
const Vue = (await import('vue')).default;
But this way may not be okay for Vue 2 with webpack bundler consumer and it expects the Vue default component to be available as below:
const Vue = (await import('vue')).default.default;
To get rid of this all together, its better to not have to use event bus itself and replace it with custom events.
Reproduction URL
No response
Reproduction steps
Access the Lume consumer with Vue 2 webpack bundler - on every hover of bar chart we see the following console error:
Expected behavior
Should be able to listen to the internal events from the root and the console error should no longer occur.
Screenshots
Logs
No response
Browsers
Firefox, Chrome, Safari, Microsoft Edge, Opera
OS
Windows, Linux, Mac
Validations