This commit is contained in:
Joel 2025-11-13 14:53:41 +08:00
parent ca7794305b
commit 1e127df4ab
5 changed files with 36 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import { ModalContextProvider } from '@/context/modal-context'
import GotoAnything from '@/app/components/goto-anything'
import Zendesk from '@/app/components/base/zendesk'
import Splash from '../components/splash'
import Test from '@edition/test'
const Layout = ({ children }: { children: ReactNode }) => {
return (
@ -21,6 +22,7 @@ const Layout = ({ children }: { children: ReactNode }) => {
<EventEmitterContextProvider>
<ProviderContextProvider>
<ModalContextProvider>
<Test />
<HeaderWrapper>
<Header />
</HeaderWrapper>

View File

@ -0,0 +1,10 @@
'use client'
import type { FC } from 'react'
import React from 'react'
const Test: FC = () => {
return (
<div>Community</div>
)
}
export default React.memo(Test)

View File

@ -0,0 +1,10 @@
'use client'
import type { FC } from 'react'
import React from 'react'
const Test: FC = () => {
return (
<div>SaaS</div>
)
}
export default React.memo(Test)

View File

@ -1,4 +1,5 @@
const { codeInspectorPlugin } = require('code-inspector-plugin')
const path = require('path')
const withPWA = require('next-pwa')({
dest: 'public',
register: true,
@ -87,6 +88,12 @@ const hasSetWebPrefix = process.env.NEXT_PUBLIC_WEB_PREFIX
const port = process.env.PORT || 3000
const locImageURLs = !hasSetWebPrefix ? [new URL(`http://localhost:${port}/**`), new URL(`http://127.0.0.1:${port}/**`)] : []
const remoteImageURLs = [hasSetWebPrefix ? new URL(`${process.env.NEXT_PUBLIC_WEB_PREFIX}/**`) : '', ...locImageURLs].filter(item => !!item)
const editionPath =
process.env.NEXT_PUBLIC_EDITION === 'CLOUD'
? './app/edition/saas/test.tsx'
: './app/edition/community/test.tsx'
path.resolve(__dirname, editionPath, '*')
console.log(editionPath)
/** @type {import('next').NextConfig} */
const nextConfig = {
@ -95,7 +102,10 @@ const nextConfig = {
turbopack: {
rules: codeInspectorPlugin({
bundler: 'turbopack'
})
}),
// resolveAlias: {
// '@edition/test': editionPath,
// }
},
productionBrowserSourceMaps: false, // enable browser source map generation during the production build
// Configure pageExtensions to include md and mdx

View File

@ -29,6 +29,9 @@
],
"~@/*": [
"./*"
],
"@edition/*": [
"./app/edition/community/*"
]
}
},