Skip to content

Commit b5fdb32

Browse files
committed
feat: update landing configuration and remove unused components
- Enhanced Next.js configuration by integrating codeInspectorPlugin for improved bundler support. - Added dynamic export settings in robots and sitemap files to enforce static generation. - Removed obsolete components and hooks to streamline the codebase, including error handling, UI elements, and various utility functions. Signed-off-by: Innei <tukon479@gmail.com>
1 parent a39e130 commit b5fdb32

File tree

129 files changed

+17
-7641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+17
-7641
lines changed

apps/landing/next.config.ts

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import NextBundleAnalyzer from '@next/bundle-analyzer'
2-
import codeInspector from 'code-inspector-plugin'
2+
import { codeInspectorPlugin } from 'code-inspector-plugin'
33
import { config } from 'dotenv'
44
import type { NextConfig } from 'next'
55
import createNextIntlPlugin from 'next-intl/plugin'
@@ -31,29 +31,11 @@ let nextConfig: NextConfig = {
3131
"default-src 'self'; script-src 'none'; sandbox; style-src 'unsafe-inline';",
3232
},
3333

34-
async rewrites() {
35-
return {
36-
beforeFiles: [
37-
{ source: '/atom.xml', destination: '/feed' },
38-
{ source: '/sitemap.xml', destination: '/sitemap' },
39-
],
40-
}
41-
},
42-
43-
webpack: (config) => {
44-
config.externals.push({
45-
'utf-8-validate': 'commonjs utf-8-validate',
46-
bufferutil: 'commonjs bufferutil',
47-
})
48-
49-
config.plugins.push(
50-
codeInspector.codeInspectorPlugin({
51-
bundler: 'webpack',
52-
hotKeys: ['altKey'],
53-
}),
54-
)
55-
56-
return config
34+
turbopack: {
35+
rules: codeInspectorPlugin({
36+
bundler: 'turbopack',
37+
hotKeys: ['altKey'],
38+
}),
5739
},
5840
}
5941

apps/landing/src/app/[locale]/layout.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77
setRequestLocale,
88
} from 'next-intl/server'
99

10-
import { HydrationEndDetector } from '~/components/common/HydrationEndDetector'
11-
import { ScrollTop } from '~/components/common/ScrollTop'
1210
import { NocturneBackground } from '~/components/landing/NocturneBackground'
1311
import { Footer } from '~/components/layout'
1412
import { PageHeader } from '~/components/layout/PageHeader'
@@ -182,7 +180,6 @@ export default async function LocaleLayout({
182180
<ClientInit />
183181
<html lang={locale} suppressHydrationWarning>
184182
<head>
185-
<HydrationEndDetector />
186183
<script
187184
type="application/ld+json"
188185
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
@@ -204,7 +201,6 @@ export default async function LocaleLayout({
204201
</Providers>
205202
</NextIntlClientProvider>
206203

207-
<ScrollTop />
208204
<InitInClient />
209205
</body>
210206
</html>

apps/landing/src/app/error.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

apps/landing/src/app/robots.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { MetadataRoute } from 'next'
22

33
import { buildAbsoluteUrl, SITE_HOST } from '~/constants/seo'
44

5+
export const dynamic = 'force-static'
56
export default function robots(): MetadataRoute.Robots {
67
return {
78
rules: [

apps/landing/src/app/sitemap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { AppLocale } from '~/i18n/config'
55
import { locales } from '~/i18n/config'
66

77
const STATIC_PATHS = ['/', '/privacy', '/terms'] as const
8-
8+
export const dynamic = 'force-static'
99
export default function sitemap(): MetadataRoute.Sitemap {
1010
const lastModified = new Date()
1111

apps/landing/src/atoms/css-media.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/landing/src/atoms/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/landing/src/atoms/is-interactive.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

apps/landing/src/atoms/viewport.ts

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)