diff --git a/web/app/edition/saas/sub/sub-c.module.css b/web/app/edition/saas/sub/sub-c.module.css index 55c1a12840..f5a32807e4 100644 --- a/web/app/edition/saas/sub/sub-c.module.css +++ b/web/app/edition/saas/sub/sub-c.module.css @@ -1,3 +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/saas/test.tsx b/web/app/edition/saas/test.tsx index 433206e4e1..8fb90b3c22 100644 --- a/web/app/edition/saas/test.tsx +++ b/web/app/edition/saas/test.tsx @@ -2,10 +2,15 @@ import type { FC } from 'react' import React from 'react' import s from '@edition/sub/sub-c.module.css' +import cn from '@/utils/classnames' const Test: FC = () => { return ( -
SaaS
+ <> +
SaaS
+
Copied
+
Import svg use alias
+ ) } export default React.memo(Test) diff --git a/web/next.config.js b/web/next.config.js index e3cc33a398..d1af079aaf 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -106,7 +106,7 @@ const editionPaths = (() => { walk(fullPath) } else if (supportPostfixReg.test(file)) { const relPath = path.relative(editionDir, fullPath) - const key = `@edition/${relPath.replace(/\\/g, '/')}`.replace(/\.(ts|tsx|css)$/, '') + const key = `@edition/${relPath.replace(/\\/g, '/')}`.replace(supportPostfixReg, '') const fullPathWithoutPrefix = `./${fullPath.replace(supportPostfixReg, '')}` result[key] = fullPathWithoutPrefix if (key.endsWith('/index')) { @@ -124,7 +124,7 @@ const editionPaths = (() => { return result })() -console.log(JSON.stringify(editionPaths, null, 2)) +// console.log(JSON.stringify(editionPaths, null, 2)) /** @type {import('next').NextConfig} */ const nextConfig = { diff --git a/web/tsconfig.json b/web/tsconfig.json index 7ce35e88b7..7ec57d1112 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -33,7 +33,11 @@ "@edition/*": [ "./app/edition/saas/*", "./app/edition/community/*", - ] + ], + "~@edition/*": [ + "./app/edition/saas/*", + "./app/edition/community/*", + ], } }, "include": [