Skip to content

Commit

Permalink
Update with-rollup with App Router. (#4848)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed May 5, 2023
1 parent 93ddc53 commit 80d31c6
Show file tree
Hide file tree
Showing 11 changed files with 377 additions and 171 deletions.
11 changes: 11 additions & 0 deletions examples/with-rollup/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-rollup/apps/web/app/page.tsx
@@ -0,0 +1,10 @@
import { Button, Header } from "ui";

export default function Page() {
return (
<>
<Header text="Web" />
<Button />
</>
);
}
6 changes: 3 additions & 3 deletions examples/with-rollup/apps/web/package.json
Expand Up @@ -9,15 +9,15 @@
"lint": "next lint"
},
"dependencies": {
"next": "latest",
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ui": "workspace:*"
},
"devDependencies": {
"@types/node": "^17.0.12",
"@types/react": "^18.0.34",
"@types/react-dom": "^18.0.11",
"@types/react": "^18.2.5",
"@types/react-dom": "^18.2.4",
"eslint-config-custom": "workspace:*",
"next-transpile-modules": "^9.0.0",
"tsconfig": "workspace:*",
Expand Down
10 changes: 0 additions & 10 deletions examples/with-rollup/apps/web/pages/index.tsx

This file was deleted.

5 changes: 4 additions & 1 deletion examples/with-rollup/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"],
"exclude": ["node_modules"]
}
Expand Up @@ -4,10 +4,11 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"eslint": "^8.40.0",
"eslint-config-next": "^12.0.8",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "7.28.0",
"eslint-config-turbo": "latest"
"eslint-config-turbo": "^1.9.3"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 1 addition & 0 deletions examples/with-rollup/packages/tsconfig/nextjs.json
Expand Up @@ -3,6 +3,7 @@
"display": "Next.js",
"extends": "./base.json",
"compilerOptions": {
"plugins": [{ "name": "next" }],
"allowJs": true,
"declaration": false,
"declarationMap": false,
Expand Down
5 changes: 5 additions & 0 deletions examples/with-rollup/packages/ui/Header.tsx
@@ -0,0 +1,5 @@
import * as React from "react";

export const Header = ({ text }: { text: string }) => {
return <h1>{text}</h1>;
};
1 change: 1 addition & 0 deletions examples/with-rollup/packages/ui/index.tsx
@@ -1,2 +1,3 @@
import * as React from "react";
export * from "./Button";
export * from "./Header";
4 changes: 2 additions & 2 deletions examples/with-rollup/packages/ui/package.json
Expand Up @@ -11,8 +11,8 @@
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.5.0",
"@types/react": "^18.0.34",
"@types/react-dom": "^18.2.0",
"@types/react": "^18.2.5",
"@types/react-dom": "^18.2.4",
"eslint": "^7.32.0",
"eslint-config-custom": "workspace:*",
"react": "^18.2.0",
Expand Down

0 comments on commit 80d31c6

Please sign in to comment.