You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In locations where follow link is implemented (i.e. in the web.php routes file) the plugin displays an error stating it cannot find the location of the Inertia view when it is custom, so all inertia pages that are not located within js/Pages directory.
Mimimal Code Sample
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
/** * Mapping project prefixes to their predefined glob patterns. */const projectMap = {
'Base': import.meta.glob('./Base/Pages/**/*.vue'),
'Blog': import.meta.glob('./Blog/Pages/**/*.vue'),
'Default': import.meta.glob('../Pages/**/*.vue'),
};
/** * Custom resolve logic for Inertia pages using a map for efficiency. */
export function resolvePage(name) {
// Determine the glob object based on the prefix in the nameconst [prefix] = name.split('/'); // Get the first segment of the name (e.g., 'Base')constglob = projectMap[prefix] || projectMap['Default']; // Use the matching glob or default glob// Resolve the page componentreturnresolvePageComponent(`./${name}.vue`, glob)
.then((resolved) => resolved);
}
The text was updated successfully, but these errors were encountered:
Extension Version
0.1.14
PHP Binary
Docker
Operating System
macOS
What happened?
In locations where follow link is implemented (i.e. in the web.php routes file) the plugin displays an error stating it cannot find the location of the Inertia view when it is custom, so all inertia pages that are not located within js/Pages directory.
Mimimal Code Sample
The text was updated successfully, but these errors were encountered: