From b4133f4b47cc7a6b43c0163af289e71ed6106086 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 11 Jun 2024 14:06:53 +0200 Subject: [PATCH] Remove typescript from app --- bench/heavy-npm-deps/app/layout.js | 28 ++++++++++++++++ bench/heavy-npm-deps/app/layout.tsx | 33 ------------------- bench/heavy-npm-deps/app/page.js | 13 ++++++++ bench/heavy-npm-deps/app/page.tsx | 13 -------- .../components/{lodash.tsx => lodash.js} | 8 ++--- .../components/{mantine.tsx => mantine.js} | 0 .../components/{mermaid.tsx => mermaid.js} | 0 bench/heavy-npm-deps/next.config.mjs | 11 +++++-- bench/heavy-npm-deps/tsconfig.json | 27 --------------- 9 files changed, 54 insertions(+), 79 deletions(-) create mode 100644 bench/heavy-npm-deps/app/layout.js delete mode 100644 bench/heavy-npm-deps/app/layout.tsx create mode 100644 bench/heavy-npm-deps/app/page.js delete mode 100644 bench/heavy-npm-deps/app/page.tsx rename bench/heavy-npm-deps/components/{lodash.tsx => lodash.js} (56%) rename bench/heavy-npm-deps/components/{mantine.tsx => mantine.js} (100%) rename bench/heavy-npm-deps/components/{mermaid.tsx => mermaid.js} (100%) delete mode 100644 bench/heavy-npm-deps/tsconfig.json diff --git a/bench/heavy-npm-deps/app/layout.js b/bench/heavy-npm-deps/app/layout.js new file mode 100644 index 0000000000000..4504374f3b2cf --- /dev/null +++ b/bench/heavy-npm-deps/app/layout.js @@ -0,0 +1,28 @@ +import localFont from 'next/font/local' +import './globals.css' + +const geistSans = localFont({ + src: './fonts/GeistVF.woff', + variable: '--font-geist-sans', + weight: '100 900', +}) +const geistMono = localFont({ + src: './fonts/GeistMonoVF.woff', + variable: '--font-geist-mono', + weight: '100 900', +}) + +export const metadata = { + title: 'Create Next App', + description: 'Generated by create next app', +} + +export default function RootLayout({ children }) { + return ( + + + {children} + + + ) +} diff --git a/bench/heavy-npm-deps/app/layout.tsx b/bench/heavy-npm-deps/app/layout.tsx deleted file mode 100644 index dca06aee77143..0000000000000 --- a/bench/heavy-npm-deps/app/layout.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import type { Metadata } from "next"; -import localFont from "next/font/local"; -import "./globals.css"; - -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", - variable: "--font-geist-sans", - weight: "100 900", -}); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", - variable: "--font-geist-mono", - weight: "100 900", -}); - -export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - - {children} - - - ); -} diff --git a/bench/heavy-npm-deps/app/page.js b/bench/heavy-npm-deps/app/page.js new file mode 100644 index 0000000000000..b72213e5df00b --- /dev/null +++ b/bench/heavy-npm-deps/app/page.js @@ -0,0 +1,13 @@ +import { LodashComponent } from '../components/lodash' +// import { MantineComponent } from "../components/mantine"; +// import { MermaidComponent } from "../components/mermaid"; + +export default function Page() { + return ( + <> + {/* */} + {/* */} + + + ) +} diff --git a/bench/heavy-npm-deps/app/page.tsx b/bench/heavy-npm-deps/app/page.tsx deleted file mode 100644 index 0cd7e8517895a..0000000000000 --- a/bench/heavy-npm-deps/app/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { LodashComponent } from '@/components/lodash' -// import { MantineComponent } from "@/components/mantine"; -// import { MermaidComponent } from "@/components/mermaid"; - -export default function Page() { - return ( - <> - {/* */} - {/* */} - - - ) -} diff --git a/bench/heavy-npm-deps/components/lodash.tsx b/bench/heavy-npm-deps/components/lodash.js similarity index 56% rename from bench/heavy-npm-deps/components/lodash.tsx rename to bench/heavy-npm-deps/components/lodash.js index 731974114d195..e19abaf41b491 100644 --- a/bench/heavy-npm-deps/components/lodash.tsx +++ b/bench/heavy-npm-deps/components/lodash.js @@ -1,12 +1,12 @@ -"use client"; -import * as Lodash from "lodash-es"; +'use client' +import * as Lodash from 'lodash-es' -console.log(Lodash); +console.log(Lodash) export function LodashComponent() { return ( <>

Client Component

- ); + ) } diff --git a/bench/heavy-npm-deps/components/mantine.tsx b/bench/heavy-npm-deps/components/mantine.js similarity index 100% rename from bench/heavy-npm-deps/components/mantine.tsx rename to bench/heavy-npm-deps/components/mantine.js diff --git a/bench/heavy-npm-deps/components/mermaid.tsx b/bench/heavy-npm-deps/components/mermaid.js similarity index 100% rename from bench/heavy-npm-deps/components/mermaid.tsx rename to bench/heavy-npm-deps/components/mermaid.js diff --git a/bench/heavy-npm-deps/next.config.mjs b/bench/heavy-npm-deps/next.config.mjs index 4678774e6d606..89a9278ccc473 100644 --- a/bench/heavy-npm-deps/next.config.mjs +++ b/bench/heavy-npm-deps/next.config.mjs @@ -1,4 +1,11 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + eslint: { + ignoreDuringBuilds: true, + }, + typescript: { + ignoreBuildErrors: true, + }, +} -export default nextConfig; +export default nextConfig diff --git a/bench/heavy-npm-deps/tsconfig.json b/bench/heavy-npm-deps/tsconfig.json deleted file mode 100644 index d8b93235f205e..0000000000000 --- a/bench/heavy-npm-deps/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2017", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -}