ankurk91/vue-toast-notification

Broken build during SSR due to `webpack@5` defaults

hacknug opened this issue · 3 comments

I'm submitting a ...

[x] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe

Tell about your platform

  • Vue.js version: ^2.6.10 (via gridsome@0.7.23)
  • Browser name and version: Chrome|Firefox|Edge x.x.x
  • This package version: 0.6.1

Current behavior
Latest published version of the plugin breaks my project's build suring SSR due to the recent change to webpack@5.

ReferenceError: self is not defined
    at Object.8TqK (node_modules/vue-toast-notification/dist/index.js:10:1)
    at __webpack_require__ (webpack/bootstrap:25:0)
    at Module.O/VM (assets/js/app.c97f0adb.js:6730:12)
    at __webpack_require__ (webpack/bootstrap:25:0)
    at Object.0 (assets/js/app.c97f0adb.js:308:18)
    at __webpack_require__ (webpack/bootstrap:25:0)
    at assets/js/app.c97f0adb.js:118:18
    at Object.<anonymous> (assets/js/app.c97f0adb.js:121:10)
    at o (/Users/nestor/Code/freelance/_archive/oasis-senses/node_modules/vue-server-renderer/build.prod.js:1:77545)
    at /Users/nestor/Code/freelance/_archive/oasis-senses/node_modules/vue-server-renderer/build.prod.js:1:78138
error Command failed with exit code 1.

Expected behavior
Project build shouldn't be affected by this change. It should be as simple as adding one line to our current webpack.config.js file as per the following documents:

Let me know if you want me to open a PR with the change 👍

Thanks for reporting.

I will release a new version.

Looks like i need to fix all of my packages

fixed in 0.6.2

please check and report if issue persist.

I can confirm the issue has been fixed. Thank you for such a quick update!