Skip to content

Commit

Permalink
feat: Configure the root directory alias infiniflow#1739 (infiniflow#…
Browse files Browse the repository at this point in the history
…2875)

### What problem does this PR solve?

feat: Configure the root directory alias infiniflow#1739

### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):
  • Loading branch information
cike8899 authored Oct 17, 2024
1 parent 0381cd9 commit 46e40c4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion web/.umirc.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import path from 'path';
import { defineConfig } from 'umi';
import { appName } from './src/conf.json';
import routes from './src/routes';

export default defineConfig({
title: appName,
outputPath: 'dist',
// alias: { '@': './src' },
alias: { root: path.resolve('../') },
npmClient: 'npm',
base: '/',
routes,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import HightLightMarkdown from '@/components/highlight-markdown';
import { useSetModalState, useTranslate } from '@/hooks/common-hooks';
import { Button, Card, Flex, Space } from 'antd';
import apiDoc from '../../../../../docs/references/api.md';
// import apiDoc from '../../../../../api/http_api.md';
import apiDoc from 'root/api/http_api.md';
import ChatApiKeyModal from '../chat-api-key-modal';
import EmbedModal from '../embed-modal';
import { usePreviewChat, useShowEmbedModal } from '../hooks';
Expand Down
6 changes: 3 additions & 3 deletions web/src/components/highlight-markdown/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
li {
padding: 4px 0px;
}
p {
white-space: pre-wrap; // https://stackoverflow.com/questions/60332183/new-line-with-react-markdown
}
// p {
// white-space: pre-wrap; // https://stackoverflow.com/questions/60332183/new-line-with-react-markdown
// }
}

.code {
Expand Down
1 change: 1 addition & 0 deletions web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "./src/.umi/tsconfig.json",
"@@/*": ["src/.umi/*"],
"root": ["../*"],
}

0 comments on commit 46e40c4

Please sign in to comment.