-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Improve TypeScript support of Next.js examples #18088
[docs] Improve TypeScript support of Next.js examples #18088
Conversation
No bundle size changes comparing e693f95...cd2198a |
I confirm it works with amp, but I had to do these changes: diff --git a/examples/nextjs-with-typescript/pages/_document.tsx b/examples/nextjs-with-typescript/pages/_document.tsx
index 05473eab3..4ac67ac2f 100644
--- a/examples/nextjs-with-typescript/pages/_document.tsx
+++ b/examples/nextjs-with-typescript/pages/_document.tsx
@@ -6,13 +6,9 @@ import theme from '../src/theme';
export default class MyDocument extends Document {
render() {
return (
- <html lang="en">
+ <html lang="en" amp="true">
<Head>
<meta charSet="utf-8" />
- <meta
- name="viewport"
- content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
- />
{/* PWA primary color */}
<meta name="theme-color" content={theme.palette.primary.main} />
<link
diff --git a/examples/nextjs-with-typescript/pages/index.tsx b/examples/nextjs-with-typescript/pages/index.tsx
index f8993c3dc..fb5cdb933 100644
--- a/examples/nextjs-with-typescript/pages/index.tsx
+++ b/examples/nextjs-with-typescript/pages/index.tsx
@@ -6,6 +6,8 @@ import MuiLink from '@material-ui/core/Link';
import ProTip from '../src/ProTip';
import Link from '../src/Link';
+export const config = { amp: true };
+
function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center"> |
@Tokenyet Thank you |
@oliviertassinari still facing the same issue when using materialui in AMP pages in nextjs. |
@mufaddal7 Maybe we broke it again, no idea. The support of AMP isn't a priority, could you look into what's wrong and fix it :)? (For v5) |
Sure, I can do that. Can you give me a head start or a guide on how you had fixed it last time? @oliviertassinari |
@mufaddal7 This pull request is about fixing AMP, it's all the information we have (I believe) |
Fix Typescript error for
Closes #18044