我在我的应用程序中使用vue-confetti包,但在构建时出现以下错误,我想知道如何克服此错误,以及如何使其仅使用Gridsome在客户端呈现。
ReferenceError: window is not defined
at Object.<anonymous> (node_modules/vue-confetti/dist/vue-confetti.js:1:210)
at __webpack_require__ (webpack/bootstrap:25:0)
at Module.<anonymous> (assets/js/app.1b103b72.js:43910:20)
at __webpack_require__ (webpack/bootstrap:25:0)
at Object.module.exports.module.exports (assets/js/app.1b103b72.js:5973:18)
at __webpack_require__ (webpack/bootstrap:25:0)
at assets/js/app.1b103b72.js:118:18
at Object.<anonymous> (assets/js/app.1b103b72.js:121:10)
at o (D:\angular\climber-website\node_modules\vue-server-renderer\build.prod.js:1:77543)
at D:\angular\climber-website\node_modules\vue-server-renderer\build.prod.js:1:78136```
[1]: https://www.npmjs.com/package/vue-confetti