feat: use next transpile packages feature (#7527)
* feat: use next transpile packages feature * Also remove next-transpile-modules from storybook (+ remove experimental) --------- Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
1 parent
5f9f6ef025
commit
fa7260d72a
3 files changed
+27
-32
No files matched your search
@@ -1,21 +1,7 @@
|
|||||||
const withBundleAnalyzer = require("@next/bundle-analyzer");
|
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 = [];
|
const plugins = [];
|
||||||
plugins.push(withTM, withBundleAnalyzer({ enabled: process.env.ANALYZE === "true" }));
|
plugins.push(withBundleAnalyzer({ enabled: process.env.ANALYZE === "true" }));
|
||||||
|
|
||||||
/** @type {import("next").NextConfig} */
|
/** @type {import("next").NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
@@ -27,7 +13,18 @@ const nextConfig = {
|
|||||||
typescript: {
|
typescript: {
|
||||||
ignoreBuildErrors: true,
|
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: {
|
eslint: {
|
||||||
ignoreDuringBuilds: true,
|
ignoreDuringBuilds: true,
|
||||||
},
|
},
|
||||||
|
|||||||
+14
-15
@@ -2,20 +2,6 @@ require("dotenv").config({ path: "../../.env" });
|
|||||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||||
const { withSentryConfig } = require("@sentry/nextjs");
|
const { withSentryConfig } = require("@sentry/nextjs");
|
||||||
const os = require("os");
|
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 { withAxiom } = require("next-axiom");
|
||||||
const { i18n } = require("./next-i18next.config");
|
const { i18n } = require("./next-i18next.config");
|
||||||
@@ -80,7 +66,6 @@ if (process.env.ANALYZE === "true") {
|
|||||||
plugins.push(withBundleAnalyzer);
|
plugins.push(withBundleAnalyzer);
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.push(withTM);
|
|
||||||
plugins.push(withAxiom);
|
plugins.push(withAxiom);
|
||||||
/** @type {import("next").NextConfig} */
|
/** @type {import("next").NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
@@ -94,6 +79,20 @@ const nextConfig = {
|
|||||||
eslint: {
|
eslint: {
|
||||||
ignoreDuringBuilds: !!process.env.CI,
|
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: {
|
modularizeImports: {
|
||||||
"@calcom/ui/components/icon": {
|
"@calcom/ui/components/icon": {
|
||||||
transform: "@react-icons/all-files/fi/{{member}}",
|
transform: "@react-icons/all-files/fi/{{member}}",
|
||||||
|
|||||||
@@ -92,7 +92,6 @@
|
|||||||
"next-i18next": "^11.3.0",
|
"next-i18next": "^11.3.0",
|
||||||
"next-seo": "^4.26.0",
|
"next-seo": "^4.26.0",
|
||||||
"next-themes": "^0.2.0",
|
"next-themes": "^0.2.0",
|
||||||
"next-transpile-modules": "^10.0.0",
|
|
||||||
"nodemailer": "^6.7.8",
|
"nodemailer": "^6.7.8",
|
||||||
"otplib": "^12.0.1",
|
"otplib": "^12.0.1",
|
||||||
"qrcode": "^1.5.1",
|
"qrcode": "^1.5.1",
|
||||||
|
|||||||
Reference in new issue
Block a user