I’m curious, whether it is recommended (or at least doesn’t severely go against the guidelines/patterns) to have a named export in a Vue-file alongside with the default export.
An example:
// component-1.vue
<script>
// The idea is to make this class importable right from the Vue-file
export class TestClass {
// class implementation
}
</script>
<script setup>
console.log('TestClass is available in the setup-script of component-1', TestClass)
</script>
// component-2.vue
<script setup>
// Here the Component1 is imported together with the TestClass from the very same Vue-file
import Component1, { TestClass } from './component-1.vue'
console.log('TestClass still works perfectly fine in the component-2', TestClass)
</script>
Though the documentation does not forbid such approach, I was not able to find any confirmations which would precisely define this as a legitimate way.
So is this a good or a bad practice?