简体   繁体   中英

angular material is not recognized in firebase hosting

While serving in local host is working properly but when I deploy in the firebase hosting, angular materials is not recognized. displaying as plain html page

{
  "hosting": {
    "public": "dist/app name",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

I had a similar problem. The styles of angular material were not displayed correctly when I wanted to deploy my app in firebase, but the animations worked. So I found this: What is purpose of the property "private" in package.json?

After I set "private: true" to "false" my styles were correctly displayed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM