在生產中我可以與甜警報工作,但是當我把現場的時候,我得到這個錯誤:爲什麼Sweet Alert只能在這種情況下生產?
Uncaught ReferenceError: swal is not defined
我跑npm install sweetalert
,並添加以下兩行的index.html的負責人:
< script src="node_modules/sweetalert/dist/sweetalert.min.js">
< link rel="stylesheet" href="node_modules/sweetalert/dist/sweetalert.css">
這是他們應該在哪裏?他們應該在其他地方嗎?
頁面加載時,Chrome瀏覽器的控制檯顯示了這三種錯誤:
GET https://wfolly.firebaseapp.com/node_modules/sweetalert/dist/sweetalert.css wfolly.firebaseapp.com/:24 GET https://wfolly.firebaseapp.com/node_modules/sweetalert/dist/sweetalert.min.js wfolly.firebaseapp.com/:25 GET https://wfolly.firebaseapp.com/node_modules/sweetalert/dist/sweetalert.css
我都試過與不node_modules/sweetalert目錄部署的網站。
我是新手。一個基本的錯誤是可能的。
想法歡迎。