Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Move to @/next package

Manav Rathi3e9538f59e0e
diff --git a/apps/accounts/next.config.js b/apps/accounts/next.config.js
index 3148783d57..9efbf75616 100644
--- a/apps/accounts/next.config.js
+++ b/apps/accounts/next.config.js
@@ -1,4 +1,4 @@
-const nextConfigBase = require('@ente/shared/next/next.config.base.js');
+const nextConfigBase = require('@/next/next.config.base.js');
module.exports = {
...nextConfigBase,
diff --git a/apps/auth/next.config.js b/apps/auth/next.config.js
index d09487bad1..57e1c5c8b5 100644
--- a/apps/auth/next.config.js
+++ b/apps/auth/next.config.js
@@ -1,3 +1,3 @@
-const nextConfigBase = require('@ente/shared/next/next.config.base.js');
+const nextConfigBase = require('@/next/next.config.base.js');
module.exports = nextConfigBase;
diff --git a/apps/cast/next.config.js b/apps/cast/next.config.js
index d09487bad1..57e1c5c8b5 100644
--- a/apps/cast/next.config.js
+++ b/apps/cast/next.config.js
@@ -1,3 +1,3 @@
-const nextConfigBase = require('@ente/shared/next/next.config.base.js');
+const nextConfigBase = require('@/next/next.config.base.js');
module.exports = nextConfigBase;
diff --git a/apps/photos/next.config.js b/apps/photos/next.config.js
index d09487bad1..57e1c5c8b5 100644
--- a/apps/photos/next.config.js
+++ b/apps/photos/next.config.js
@@ -1,3 +1,3 @@
-const nextConfigBase = require('@ente/shared/next/next.config.base.js');
+const nextConfigBase = require('@/next/next.config.base.js');
module.exports = nextConfigBase;
diff --git a/packages/next/.eslintrc.js b/packages/next/.eslintrc.js
index a9a3393e03..72519a5735 100644
--- a/packages/next/.eslintrc.js
+++ b/packages/next/.eslintrc.js
@@ -3,4 +3,6 @@ module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
+ // TODO (MR): Figure out a way to not have to ignored the next config .js
+ ignorePatterns: [".eslintrc.js", "next.config.base.js"],
};
diff --git a/packages/shared/next/next.config.base.js b/packages/next/next.config.base.js
similarity index 86%
rename from packages/shared/next/next.config.base.js
rename to packages/next/next.config.base.js
index cc7c211c32..5439c94431 100644
--- a/packages/shared/next/next.config.base.js
+++ b/packages/next/next.config.base.js
@@ -10,13 +10,13 @@
* https://nextjs.org/docs/pages/api-reference/next-config-js
*/
-const { withSentryConfig } = require('@sentry/nextjs');
-const cp = require('child_process');
+const { withSentryConfig } = require("@sentry/nextjs");
+const cp = require("child_process");
const gitSHA = cp
- .execSync('git rev-parse --short HEAD', {
+ .execSync("git rev-parse --short HEAD", {
cwd: __dirname,
- encoding: 'utf8',
+ encoding: "utf8",
})
.trimEnd();
@@ -24,21 +24,21 @@ const gitSHA = cp
* The base Next.js config. Before exporting this, we wrap this in
* {@link withSentryConfig}.
*
- * @type {import('next').NextConfig}
+ * @type {import("next").NextConfig}
*/
const nextConfig = {
/* generate a static export when we run `next build` */
- output: 'export',
+ output: "export",
compiler: {
emotion: true,
},
transpilePackages: [
- '@/next',
- '@/ui',
- '@/utils',
- '@mui/material',
- '@mui/system',
- '@mui/icons-material',
+ "@/next",
+ "@/ui",
+ "@/utils",
+ "@mui/material",
+ "@mui/system",
+ "@mui/icons-material",
],
// Add environment variables to the JavaScript bundle. They will be