export default
may no longer be the recommended way to export modules, as discussed in these resources:
After changing my Vue components from this:
<script lang="ts">
'use strict';
import {store} from '../../data/store';
const c = { 'data': store };
export default c; // <-- HERE
</script>
to this:
<script lang="ts">
'use strict';
import {store} from '../../data/store';
const c = { 'data': store };
export {c as headerBar}; // <-- HERE
</script>
I encountered an error
dateWidget.vue:6 Uncaught TypeError: Cannot set property 'render' of undefine
in the browser.
Why is this happening and what is the correct approach to using modern exports with Vue and Typescript?