LoginSignup
1
1

More than 3 years have passed since last update.

Azure Static WebApps で react URL 直打ち

Posted at

routes.jsonの配置

static webapps 用のルーティング設定ファイル『routes.json』をpublicに配置して、デプロイすればOK
2020-09-08 215916.png

{
    "routes": [
        {
            "route": "/*",
            "serve": "/index.html",
            "statusCode": 200
        }
    ]
}

MSのサイト

開発環境なら別にいいけど、サイトにのっけると CSR なので、index.html に来てもらわないと、href でサイトの相対パス設定しても 404 なります

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1