Skip to content
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

Update with-npm with App Router. #4845

Merged
merged 3 commits into from May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions examples/with-npm/apps/docs/app/layout.tsx
@@ -0,0 +1,11 @@
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
10 changes: 10 additions & 0 deletions examples/with-npm/apps/docs/app/page.tsx
@@ -0,0 +1,10 @@
import { Button, Header } from "ui";

export default function Page() {
return (
<>
<Header text="Web" />
<Button />
</>
);
}
2 changes: 1 addition & 1 deletion examples/with-npm/apps/docs/package.json
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"next": "latest",
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ui": "*"
Expand Down
10 changes: 0 additions & 10 deletions examples/with-npm/apps/docs/pages/index.tsx

This file was deleted.

5 changes: 4 additions & 1 deletion examples/with-npm/apps/docs/tsconfig.json
@@ -1,5 +1,8 @@
{
"extends": "tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"plugins": [{ "name": "next" }]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
11 changes: 11 additions & 0 deletions examples/with-npm/apps/web/app/layout.tsx
@@ -0,0 +1,11 @@
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
10 changes: 10 additions & 0 deletions examples/with-npm/apps/web/app/page.tsx
@@ -0,0 +1,10 @@
import { Button, Header } from "ui";

export default function Page() {
return (
<>
<Header text="Web" />
<Button />
</>
);
}
2 changes: 1 addition & 1 deletion examples/with-npm/apps/web/package.json
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"next": "latest",
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ui": "*"
Expand Down
10 changes: 0 additions & 10 deletions examples/with-npm/apps/web/pages/index.tsx

This file was deleted.

5 changes: 4 additions & 1 deletion examples/with-npm/apps/web/tsconfig.json
@@ -1,5 +1,8 @@
{
"extends": "tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"plugins": [{ "name": "next" }]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move these to the shared next ts config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, unfortunately!

  • The plugin has to be directly in the Next.js project to get detected.
  • The includes that next cares about get reinserted when you kick off a build.

"exclude": ["node_modules"]
}