Skip to content

Scheduling infrastructure for absolutely everyone.

feat: use next transpile packages feature (#7527)

Nafees Nazikfa7260d72a0f
diff --git a/apps/storybook/next.config.js b/apps/storybook/next.config.js
index 605a550c9b3..f6b416d05e8 100644
--- a/apps/storybook/next.config.js
+++ b/apps/storybook/next.config.js
@@ -1,21 +1,7 @@
const withBundleAnalyzer = require("@next/bundle-analyzer");
-const withTM = require("next-transpile-modules")([
- "@calcom/app-store",
- "@calcom/dayjs",
- "@calcom/emails",
- "@calcom/trpc",
- "@calcom/embed-core",
- "@calcom/embed-react",
- "@calcom/features",
- "@calcom/lib",
- "@calcom/prisma",
- "@calcom/ui",
-]);
-const glob = require("glob");
-
const plugins = [];
-plugins.push(withTM, withBundleAnalyzer({ enabled: process.env.ANALYZE === "true" }));
+plugins.push(withBundleAnalyzer({ enabled: process.env.ANALYZE === "true" }));
/** @type {import("next").NextConfig} */
const nextConfig = {
@@ -27,7 +13,18 @@ const nextConfig = {
typescript: {
ignoreBuildErrors: true,
},
- experimental: { images: { allowFutureImage: true } },
+ transpilePackages: [
+ "@calcom/app-store",
+ "@calcom/dayjs",
+ "@calcom/emails",
+ "@calcom/trpc",
+ "@calcom/embed-core",
+ "@calcom/embed-react",
+ "@calcom/features",
+ "@calcom/lib",
+ "@calcom/prisma",
+ "@calcom/ui",
+ ],
eslint: {
ignoreDuringBuilds: true,
},
diff --git a/apps/web/next.config.js b/apps/web/next.config.js
index 5138b31987f..80079fe4242 100644
--- a/apps/web/next.config.js
+++ b/apps/web/next.config.js
@@ -2,20 +2,6 @@ require("dotenv").config({ path: "../../.env" });
const CopyWebpackPlugin = require("copy-webpack-plugin");
const { withSentryConfig } = require("@sentry/nextjs");
const os = require("os");
-const withTM = require("next-transpile-modules")([
- "@calcom/app-store",
- "@calcom/core",
- "@calcom/dayjs",
- "@calcom/emails",
- "@calcom/embed-core",
- "@calcom/embed-react",
- "@calcom/embed-snippet",
- "@calcom/features",
- "@calcom/lib",
- "@calcom/prisma",
- "@calcom/trpc",
- "@calcom/ui",
-]);
const { withAxiom } = require("next-axiom");
const { i18n } = require("./next-i18next.config");
@@ -80,7 +66,6 @@ if (process.env.ANALYZE === "true") {
plugins.push(withBundleAnalyzer);
}
-plugins.push(withTM);
plugins.push(withAxiom);
/** @type {import("next").NextConfig} */
const nextConfig = {
@@ -94,6 +79,20 @@ const nextConfig = {
eslint: {
ignoreDuringBuilds: !!process.env.CI,
},
+ transpilePackages: [
+ "@calcom/app-store",
+ "@calcom/core",
+ "@calcom/dayjs",
+ "@calcom/emails",
+ "@calcom/embed-core",
+ "@calcom/embed-react",
+ "@calcom/embed-snippet",
+ "@calcom/features",
+ "@calcom/lib",
+ "@calcom/prisma",
+ "@calcom/trpc",
+ "@calcom/ui",
+ ],
modularizeImports: {
"@calcom/ui/components/icon": {
transform: "@react-icons/all-files/fi/{{member}}",
diff --git a/apps/web/package.json b/apps/web/package.json
index 58575af2821..41e59c73a27 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -92,7 +92,6 @@
"next-i18next": "^11.3.0",
"next-seo": "^4.26.0",
"next-themes": "^0.2.0",
- "next-transpile-modules": "^10.0.0",
"nodemailer": "^6.7.8",
"otplib": "^12.0.1",
"qrcode": "^1.5.1",