From 0148265b5fe942d803f8b323f25acbd1b6422e3e Mon Sep 17 00:00:00 2001 From: giancarlo Date: Sat, 20 Apr 2024 15:17:34 +0800 Subject: [PATCH] Add TurboPack details to README and update Next.js config The README.md was updated with information about TurboPack which is now used by default and still experimental. The Next.js configuration was also modified to support this. Instructions on how to switch back to the default bundler in case of any issues were added as well. --- README.md | 6 ++++++ apps/web/next.config.mjs | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e901a492..d9cdae828 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,12 @@ This command will run the web application. Please refer to `apps/web/README.md` for more information about the web application. +#### Turbopack + +Makerkit uses Turbopack by default. Turbopack is the new bundler for Next.js - and it is still experimental. It is faster, but it may have some issues. + +If you encounter any issues, you can switch to the default Next.js by removing the flag `--turbo` from the `dev` command in `apps/web/package.json`. + ### 3. Start the Supabase server To start the Supabase server, you can use the following command: diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index bfd5b58de..86f31201c 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -26,7 +26,6 @@ const config = { reactStrictMode: true, /** Enables hot reloading for local packages without a build step */ transpilePackages: INTERNAL_PACKAGES, - pageExtensions: ['ts', 'tsx'], images: { remotePatterns: getRemotePatterns(), }, @@ -34,6 +33,9 @@ const config = { mdxRs: true, taint: true, instrumentationHook: true, + turbo: { + resolveExtensions: ['.ts', '.tsx', '.js', '.jsx'], + }, optimizePackageImports: [ 'recharts', 'lucide-react',