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
Is this how this plug-in is supposed to work? #3
Comments
Emm.... has some mistakes...
- inertia(({ composer }) => {
- namespaces: [
- composer( 'hpprx/core', '.' ),
- composer( 'hpprx/myapp', 'Modules/Myapp' ),
- ]
- }),
+ inertia({
+ namespaces: [
+ { myapp: 'Modules/Myapp/Resources/views/pages' },
+ ],
+ }), The namespace object is a namespace => path mapping,
createInertiaApp({
- resolve: resolvePage(() => (
- import.meta.glob('./pages/**/*.vue')
- )),
+ resolve: resolvePage(() => {
+ return import.meta.glob('../views/pages/**/*.vue')
+ }), This loads the main pages for the main app, but then your pages are put in
<template>
...
<span class="dark:text-white px-2 text-lg font-semibold">In plugin</span>
...
</template>
Route::get('/', function () {
return inertia('welcome'); // resources/views/pages/welcome.vue
});
Route::get('/myapp', function () {
return inertia('myapp::welcome'); // Modules/Myapp/Resources/views/pages/welcome.vue
}); |
Hi,
So I'm playing around with your inertia plugin, however my
vite.config.ts
doesn't seem to be building my module correctly, Am I over-thinking how this plug-in works? Probably, but that's why I figured I'd ask. :pThanks!
The text was updated successfully, but these errors were encountered: