ourjapanlife / findadoc-web

Front-end repository for Find a Doc, Japan
https://findadoc.jp
BSD 3-Clause "New" or "Revised" License
16 stars 14 forks source link

Move `vue-toastification` into the build in `nuxt.config` #779

Closed NabbeunNabi closed 1 month ago

NabbeunNabi commented 1 month ago

Problem

The deployment fails when using toast notifications if the vue-toastification library is not in the build in the nuxt.config. So we need to move it into the proper place.

Success

The app successfully deploys on Netlify with a test toast and then removing the toast after the test has been done.

Requirements

Context

  1. Follow the documentation of registering it into Nuxt from the library itself
  2. Registering the plugin
  3. Making a custom module
  4. Making a Pinia store for the toasts

In all the above cases the deployment on Netlify when using toasts failed.

NabbeunNabi commented 1 month ago

It was found that if you use onMounted in Vue this fixes the problem