diff --git a/web/app/edition/community/copied.svg b/web/app/edition/community/copied.svg new file mode 100644 index 0000000000..de5f86cc19 --- /dev/null +++ b/web/app/edition/community/copied.svg @@ -0,0 +1,3 @@ + + + diff --git a/web/app/edition/community/sub/sub-c.module.css b/web/app/edition/community/sub/sub-c.module.css new file mode 100644 index 0000000000..f5a32807e4 --- /dev/null +++ b/web/app/edition/community/sub/sub-c.module.css @@ -0,0 +1,21 @@ +.bg { + background-color: red; +} + +.bgImg { + background-repeat: no-repeat; + background-repeat: left center; + background-image: url(~@/app/components/develop/secret-key/assets/play.svg); +} + +.bgCopied { + background-repeat: no-repeat; + background-repeat: left center; + background-image: url(../copied.svg); +} + +.bgCopied2 { + background-repeat: no-repeat; + background-repeat: left center; + background-image: url(~@edition/copied.svg); +} diff --git a/web/app/edition/community/sub/sub-sub/index.tsx b/web/app/edition/community/sub/sub-sub/index.tsx new file mode 100644 index 0000000000..2152e116f3 --- /dev/null +++ b/web/app/edition/community/sub/sub-sub/index.tsx @@ -0,0 +1,13 @@ +'use client' +import type { FC } from 'react' +import React from 'react' +import s from '../sub-c.module.css' + +const SubSub: FC = () => { + return ( +
+ Sub Sub +
+ ) +} +export default React.memo(SubSub) diff --git a/web/app/edition/community/sub/sub-sub/sss.tsx b/web/app/edition/community/sub/sub-sub/sss.tsx new file mode 100644 index 0000000000..e69de29bb2 diff --git a/web/app/edition/community/sub/sub.ts b/web/app/edition/community/sub/sub.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/web/next.config.js b/web/next.config.js index d1af079aaf..dd10209386 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -91,6 +91,7 @@ const locImageURLs = !hasSetWebPrefix ? [new URL(`http://localhost:${port}/**`), const remoteImageURLs = [hasSetWebPrefix ? new URL(`${process.env.NEXT_PUBLIC_WEB_PREFIX}/**`) : '', ...locImageURLs].filter(item => !!item) const isSaaS = process.env.NEXT_PUBLIC_EDITION === 'CLOUD' +console.log(isSaaS) const supportPostfixReg = /\.(ts|tsx|css|svg|jpg|jpeg|png)$/ const editionPaths = (() => { const editionDir = `./app/edition/${isSaaS ? 'saas' : 'community'}` @@ -134,9 +135,9 @@ const nextConfig = { rules: codeInspectorPlugin({ bundler: 'turbopack' }), - resolveAlias: { - ...editionPaths, - } + // resolveAlias: { + // ...editionPaths, + // } }, productionBrowserSourceMaps: false, // enable browser source map generation during the production build // Configure pageExtensions to include md and mdx @@ -166,6 +167,7 @@ const nextConfig = { typescript: { // https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors ignoreBuildErrors: true, + tsconfigPath: isSaaS ? 'tsconfig.json' : 'tsconfig.ce.json', }, reactStrictMode: true, async redirects() { diff --git a/web/tsconfig.ce.json b/web/tsconfig.ce.json new file mode 100644 index 0000000000..ca03b1c445 --- /dev/null +++ b/web/tsconfig.ce.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "paths": { + "@edition/*": [ + "./app/edition/community/*" + ], + "~@edition/*": [ + "./app/edition/community/*" + ] + } + } +}