You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure Static Web Apps is built to automatically carry out common tasks like installing npm modules and running `npm run build` during each deployment. There are, however, a few settings like the application source folder and the build destination folder that you need to configure manually.
155
156
156
157
1. Click on the **Build** tab to configure the static output folder.
1. Type **out** in the *App artifact location* text box.
161
162
@@ -184,7 +185,7 @@ Return to the terminal and run the following command `git pull origin maser`.
184
185
185
186
Navigate to the newly-deployed site and click on one of the framework or library logos. Instead of getting a details page, you get a 404 error page.
186
187
187
-

188
+
:::image type="content" source="media/deploy-nextjs/404-in-production.png" alt-text="404 on dynamic routes":::
188
189
189
190
The reason for this error is because Next.js only generated the home page based on the application configuration.
190
191
@@ -220,8 +221,8 @@ The reason for this error is because Next.js only generated the home page based
220
221
221
222
2. Push the new changes to your GitHub repository and wait for a few minutes while GitHub Actions builds your site again. After the build is complete, the 404 error disappears.
222
223
223
-

224
-
224
+
225
+
:::image type="content" source="media/deploy-nextjs/404-in-production-fixed.png" alt-text="404 on dynamic routes fixed":::
Azure Static Web Apps is built to automatically carry out common tasks like installing npm modules and running `npm run build` during each deployment. There are, however, a few settings like the application source folder and the build destination folder that you need to configure manually.
138
138
139
139
1. Click on the **Build** tab to configure the static output folder.
1. Type **dist** in the *App artifact location* text box.
144
144
@@ -167,7 +167,7 @@ Return to the terminal and run the following command `git pull origin maser`.
167
167
168
168
Navigate to the newly-deployed site and click on one of the framework or library logos. Instead of getting a details page, you get a 404 error page.
169
169
170
-

170
+
:::image type="content" source="media/deploy-nuxtjs/404-in-production.png" alt-text="404 on dynamic routes":::
171
171
172
172
The reason for this is, Nuxt.js generated the static site, it only did so for the home page. Nuxt.js can generate equivalent static `.html` files for every `.vue` pages file, but there's an exception.
173
173
@@ -204,8 +204,7 @@ If the page is a dynamic page, for example `_id.vue`, it won't have enough infor
204
204
205
205
2. Push the new changes to your GitHub repository and waitfor a few minutes while GitHub Actions builds your site again. After the build is complete, the 404 error disappears.
206
206
207
-

208
-
207
+
:::image type="content" source="media/deploy-nuxtjs/404-in-production-fixed.png" alt-text="404 on dynamic routes fixed":::
0 commit comments