I'm using Qwik and I can't use dynamic import. Thus I have this line of code:
import { OverridenLayout } from 'BlogOverride'
This means that in my tsconfig.json
file, I need to configure a barrel:
"compilerOptions": {
"paths": {
"BlogOverride": [
"src/Modules/Blog/Exports"
],
This means that the src/Modules/Blog/Exports
file should be present, and it should export a named component called OverridenLayout
.
This makes our life very difficult, because even if we don't want to override a layout, we need to include that file, and write some boilerplate code in it.
What can I do to make this dynamic layout loading possible, without boilerplate code?