File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -90,4 +90,5 @@ email-preview
9090/backups /firebase /storage /data /
9191
9292android /app /release *
93- icons /
93+ icons /
94+ * .bak
Original file line number Diff line number Diff line change @@ -27,4 +27,19 @@ cd web
2727
2828rm -rf .next
2929
30+ # Hack to ignore getStaticProps and getStaticPaths for mobile webview build
31+ # as Next.js doesn't support SSR / ISR on mobile
32+ USERNAME_PAGE=pages/[username]/index.tsx
33+
34+ # rename getStaticProps to _getStaticProps
35+ sed -i.bak ' s/\bgetStaticProps\b/_getStaticProps/g' $USERNAME_PAGE
36+
37+ # rename getStaticPaths to _getStaticPaths
38+ sed -i.bak ' s/\bgetStaticPaths\b/_getStaticPaths/g' $USERNAME_PAGE
39+
3040yarn build
41+
42+ sed -i.bak ' s/\b_getStaticProps\b/getStaticProps/g' $USERNAME_PAGE
43+
44+ # rename getStaticPaths to _getStaticPaths
45+ sed -i.bak ' s/\b_getStaticPaths\b/getStaticPaths/g' $USERNAME_PAGE
You can’t perform that action at this time.
0 commit comments