-
Notifications
You must be signed in to change notification settings - Fork 4
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
Optional Features #117
Comments
Also remove "data files" or "genome files"? |
Vue Dynamic import of optional features
To enable or disable features in a Vue 3 app built with Vite based on configuration, you can use conditional rendering and dynamic imports. Here's a basic approach:
// config.js
export default {
enableFeatureA: true,
enableFeatureB: false,
};
// MyComponent.vue
import config from '@/config';
export default {
async mounted() {
if (config.enableFeatureA) {
const { featureA } = await import('./FeatureA');
// Use featureA here
}
if (config.enableFeatureB) {
const { featureB } = await import('./FeatureB');
// Use featureB here
}
},
};
Remember to manage your dependencies and imports carefully to avoid unnecessary code in the final build. This approach ensures that only the necessary code for enabled features is included in the final build, helping to keep your app lightweight and efficient. |
"Genome Browser" - This field is only relevant in CMG / Xenium applications.
Options:
After merging bioloop commit to remove genome_browser into Xenium, apply a reverse commit to bring back the genome_browser feature in Xenium.
The text was updated successfully, but these errors were encountered: