├── .gitignore ├── .eslintignore ├── .eslintrc ├── templates └── default │ └── resources │ ├── scripts │ ├── shims-vue.d.ts │ ├── main.ts │ └── vite │ │ └── inertia-layout.ts │ └── views │ ├── app.blade.php │ ├── components │ ├── resource-block.vue │ ├── inertia-logo.vue │ └── laravel-logo.vue │ ├── layouts │ └── default.vue │ └── pages │ └── welcome.vue ├── package.json ├── tsconfig.json ├── README.md ├── .github └── workflows │ └── boilerplate.yml ├── preset.ts └── pnpm-lock.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | public 3 | vendor 4 | **/dist 5 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@innocenzi/eslint-config" 3 | } 4 | -------------------------------------------------------------------------------- /templates/default/resources/scripts/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | // This is required for Visual Studio Code to recognize 2 | // imported .vue files 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | const component: DefineComponent<{}, {}, any> 6 | export default component 7 | } 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "author": "Enzo Innocenzi ", 4 | "license": "MIT", 5 | "preset": "preset.ts", 6 | "devDependencies": { 7 | "@innocenzi/eslint-config": "^0.9.2", 8 | "@preset/core": "0.6.0", 9 | "@types/node": "^17.0.33", 10 | "eslint": "^8.15.0", 11 | "typescript": "^4.6.4" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /templates/default/resources/views/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Laravel with Inertia 7 | @vite 8 | 9 | 10 | @inertia 11 | 12 | 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "esnext", 4 | "baseUrl": ".", 5 | "target": "es2016", 6 | "lib": ["esnext"], 7 | "esModuleInterop": true, 8 | "skipLibCheck": true, 9 | "moduleResolution": "node", 10 | "resolveJsonModule": true, 11 | "types": ["node", "@preset/core/globals"] 12 | }, 13 | "include": [ 14 | "./*.ts", 15 | "./src/**/*.ts" 16 | ], 17 | "exclude": ["templates", "node_modules"] 18 | } 19 | -------------------------------------------------------------------------------- /templates/default/resources/scripts/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp, h } from 'vue' 2 | import { createInertiaApp } from '@inertiajs/inertia-vue3' 3 | import { resolvePageComponent } from 'vite-plugin-laravel/inertia' 4 | 5 | createInertiaApp({ 6 | resolve: (name) => resolvePageComponent(name, import.meta.glob('../views/pages/**/*.vue')), 7 | setup({ el, app, props, plugin }) { 8 | createApp({ render: () => h(app, props) }) 9 | .use(plugin) 10 | .mount(el) 11 | }, 12 | }) 13 | -------------------------------------------------------------------------------- /templates/default/resources/scripts/vite/inertia-layout.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vite' 2 | 3 | const PLUGIN_NAME = 'vite:inertia:layout' 4 | const TEMPLATE_LAYOUT_REGEX = /