2017-10-14 89 views
0

我已經通過preact-CLI產生漸進式Web App和希望部署的火力靜態preact-CLI和火力部署靜態

npm run serve -- --server config 

上面的命令給我靜態輸出。但不會將網站推送到Firebase託管。

回答

1

你需要有firebase.json文件裏面的項目和database.rules.json文件裏面的構建文件。一旦你有這些文件嘗試firebase init然後選擇則數據庫嘗試firebase deploy

database.rules.json

{ 
    "rules": { 
    ".read": "auth != null", 
    ".write": "auth != null" 
    } 
} 

firebase.json

{ 
    "database": { 
    "rules": "build/database.rules.json" 
    }, 
    "hosting": { 
    "public": "build", 
    "rewrites": [ 
     { 
     "source": "**", 
     "destination": "/build/index.html" 
     } 
    ] 
    } 
}