Skip to content

Commit 3cf067e

Browse files
Merge pull request #2 from reinink/master
Setup Inertia Vue plugin
2 parents e5732c3 + b4ce8c4 commit 3cf067e

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

src/inertiajs-stubs/resources/js/Shared/Layout.vue

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<inertia-link class="nav-link" href="/contact">Contact</inertia-link>
2020
</li>
2121
</ul>
22-
22+
2323
</div>
2424
</div>
2525
</nav>
@@ -37,13 +37,3 @@
3737
</main>
3838
</div>
3939
</template>
40-
41-
<script>
42-
import { InertiaLink } from 'inertia-vue'
43-
44-
export default {
45-
components: {
46-
InertiaLink,
47-
},
48-
}
49-
</script>

src/inertiajs-stubs/resources/js/app.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ require('./bootstrap')
33
import Inertia from 'inertia-vue'
44
import Vue from 'vue'
55

6+
Vue.use(Inertia)
7+
68
let app = document.getElementById('app')
79

810
new Vue({
911
render: h => h(Inertia, {
1012
props: {
1113
initialPage: JSON.parse(app.dataset.page),
12-
resolveComponent: (component) => {
13-
return import(`@/Pages/${component}`).then(module => module.default)
14+
resolveComponent: (name) => {
15+
return import(`@/Pages/${name}`).then(module => module.default)
1416
},
1517
},
1618
}),

0 commit comments

Comments
 (0)