We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
I add three [home, default, 404] in src/layouts use jsx. 1、 vite.config.ts
Layouts({ extensions: ['vue', 'jsx'], }),
2、add layout yaml config
import { defineComponent } from 'vue' export default defineComponent({ setup() { const { t } = useI18n() // eslint-disable-next-line unused-imports/no-unused-vars const route = useRoute() return () => ( <> <div> Test layout </div> <route lang="yaml"> meta: layout: home </route> </> ) }, })
But it always use default layout when file name is index.jsx. when I change back to index.vue. It works with meta layout.
The text was updated successfully, but these errors were encountered:
@whoooami Because the custom block only applies to the SFC,jsx is so dynamic that parsing it is difficult, and in most cases the only way to know what's going on inside is to run it.
jsx
However, vite-plugin-vue-layout needs to get the meta of the corresponding page routes before running
vite-plugin-vue-layout
Sorry, something went wrong.
[Whoami][JohnCampionJr#145] - add pageLayout to Layout in vite config.
0b11bca
c9909cd
markthree
No branches or pull requests
I add three [home, default, 404] in src/layouts use jsx.
1、 vite.config.ts
2、add layout yaml config
But it always use default layout when file name is index.jsx. when I change back to index.vue. It works with meta layout.
The text was updated successfully, but these errors were encountered: