From 4f05a345a9c01901fbf3eeaca586649af9314719 Mon Sep 17 00:00:00 2001 From: Daan Klarenbeek Date: Wed, 3 May 2023 13:46:41 +0200 Subject: [PATCH] fix: nextjs not starting due to dynamic list --- apps/web/next.config.mjs | 18 ++++++++++++++---- apps/web/tsconfig.eslint.json | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index 70eac5d5..d3461962 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -1,12 +1,22 @@ -import { readdirSync } from "node:fs"; -import { join } from "node:path"; +// import { readdirSync } from "node:fs"; +// import { join } from "node:path"; -const transpilePackages = readdirSync(join(process.cwd(), "..", "..", "packages")).map((pkg) => `@paperplane/${pkg}`); +// const transpilePackages = readdirSync(join(process.cwd(), "..", "..", "packages")).map((pkg) => `@paperplane/${pkg}`); /** @type {import('next').NextConfig} */ const config = { reactStrictMode: false, - transpilePackages + transpilePackages: [ + "@paperplane/buttons", + "@paperplane/forms", + "@paperplane/logo", + "@paperplane/markdown", + "@paperplane/modal", + "@paperplane/navbar", + "@paperplane/swr", + "@paperplane/ui", + "@paperplane/utils" + ] }; export default config; diff --git a/apps/web/tsconfig.eslint.json b/apps/web/tsconfig.eslint.json index 56363be0..aa38c476 100644 --- a/apps/web/tsconfig.eslint.json +++ b/apps/web/tsconfig.eslint.json @@ -1,4 +1,4 @@ { "extends": "./tsconfig.json", - "include": ["test", "src"] + "include": ["test", "src", "next.config.mjs"] }