Skip to content
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

Can the inertia-plugin be used by a laravel app to render a vue file from a locally hosted laravel package? #7

Open
connecteev opened this issue Jul 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@connecteev
Copy link

This is more of a question about how this plugin can be used. Here's a clean repo running Laravel, that isolates a problem I am having:
https://github.com/connecteev/laravel_dummy_code_for_package_customization

This Laravel app makes use of a package that is running Inertia + Vue.js, and uses Vite for asset bundling. Link: https://github.com/connecteev/laravel_dummy_code_for_package_customization/tree/main/_LOCAL_PACKAGES/keenbrain_dummy_package/

All the context you would need to get this running and understand the problem is in the README.md

This is the error I am getting from the package when I run the application and go to http://127.0.0.1:8000/foo:

GET http://[::1]:5173/resources/js/Pages/Foo.vue net::ERR_ABORTED 404 (Not Found)
index.js:4 Uncaught (in promise) Error: Page not found: ./Pages/Foo.vue
    at resolvePageComponent (index.js:4:15)
    at resolve (app.js:13:24)
    at r (createInertiaApp.ts:34:54)
    at j2 (createInertiaApp.ts:38:24)
    at app.js:11:1

I see the same problem when I go to a different route: http://127.0.0.1:8000/portal
In both cases, the Page (Vue file) cannot be rendered, even though it exists in the package: https://github.com/connecteev/laravel_dummy_code_for_package_customization/tree/main/_LOCAL_PACKAGES/keenbrain_dummy_package/resources/js/Pages

Can this Inertia-Plugin be used to fix this problem? If so, can you point me to how that can be done?

@connecteev connecteev added the enhancement New feature or request label Jul 20, 2023
@connecteev connecteev changed the title Can the inertia-plugin be used by a laravel app to render a vue file from a laravel package? Can the inertia-plugin be used by a laravel app to render a vue file from a locally hosted laravel package? Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant