Skip to content

Commit

Permalink
feat: vue-toastification plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
DanericNetwork committed Dec 20, 2023
1 parent 10749b7 commit 559fda3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
11 changes: 10 additions & 1 deletion src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@inertiajs/vue3": "^1.0.14",
"@vitejs/plugin-vue": "^4.5.0",
"pinia": "^2.1.7",
"vue": "^3.3.8"
"vue": "^3.3.8",
"vue-toastification": "^2.0.0-rc.5"
}
}
23 changes: 13 additions & 10 deletions src/resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ import './bootstrap';
import { createApp, h } from 'vue'
import { createPinia } from 'pinia'
import { createInertiaApp } from '@inertiajs/vue3'
import ToastPlugin from "vue-toastification";
import "vue-toastification/dist/index.css";
import '../vue/scss/global.scss'
import '../vue/scss/variables.scss'

createInertiaApp({
resolve: name => {
const pages = import.meta.glob('../vue/pages/**/*.vue', { eager: true })
return pages[`../vue/pages/${name}.vue`]
},
setup({ el, App, props, plugin }) {
createApp({ render: () => h(App, props) })
.use(plugin)
.use(createPinia())
.mount(el)
},
resolve: name => {
const pages = import.meta.glob('../vue/pages/**/*.vue', { eager: true })
return pages[`../vue/pages/${name}.vue`]
},
setup({ el, App, props, plugin }) {
createApp({ render: () => h(App, props) })
.use(plugin)
.use(createPinia())
.use(ToastPlugin)
.mount(el)
},
})

0 comments on commit 559fda3

Please sign in to comment.