### What problem does this PR solve? feat: Load markdown file with "asset/source" #17339 ### 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):
This commit is contained in:
parent
bedb05012d
commit
167b4af52b
@ -6,7 +6,7 @@ import routes from './src/routes';
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
title: appName,
|
title: appName,
|
||||||
outputPath: 'dist',
|
outputPath: 'dist',
|
||||||
alias: { root: path.resolve('../') },
|
alias: { '@parent': path.resolve(__dirname, '../') },
|
||||||
npmClient: 'npm',
|
npmClient: 'npm',
|
||||||
base: '/',
|
base: '/',
|
||||||
routes,
|
routes,
|
||||||
@ -26,9 +26,6 @@ export default defineConfig({
|
|||||||
hack: `true; @import "~@/less/index.less";`,
|
hack: `true; @import "~@/less/index.less";`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mdx: {
|
|
||||||
loader: 'remark-loader',
|
|
||||||
},
|
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
copy: ['src/conf.json'],
|
copy: ['src/conf.json'],
|
||||||
proxy: {
|
proxy: {
|
||||||
@ -41,14 +38,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
chainWebpack(memo, args) {
|
chainWebpack(memo, args) {
|
||||||
memo.module
|
memo.module.rule('markdown').test(/\.md$/).type('asset/source');
|
||||||
.rule('markdown')
|
|
||||||
.test(/\.md$/)
|
|
||||||
.use('html-loader')
|
|
||||||
.loader('html-loader')
|
|
||||||
.end()
|
|
||||||
.use('remark-loader')
|
|
||||||
.loader('remark-loader');
|
|
||||||
|
|
||||||
return memo;
|
return memo;
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import HightLightMarkdown from '@/components/highlight-markdown';
|
|||||||
import { useSetModalState, useTranslate } from '@/hooks/common-hooks';
|
import { useSetModalState, useTranslate } from '@/hooks/common-hooks';
|
||||||
import { Button, Card, Flex, Space } from 'antd';
|
import { Button, Card, Flex, Space } from 'antd';
|
||||||
// import apiDoc from '../../../../../api/http_api.md';
|
// import apiDoc from '../../../../../api/http_api.md';
|
||||||
import apiDoc from 'root/api/http_api.md';
|
import apiDoc from '@parent/api/http_api.md';
|
||||||
import ChatApiKeyModal from '../chat-api-key-modal';
|
import ChatApiKeyModal from '../chat-api-key-modal';
|
||||||
import EmbedModal from '../embed-modal';
|
import EmbedModal from '../embed-modal';
|
||||||
import { usePreviewChat, useShowEmbedModal } from '../hooks';
|
import { usePreviewChat, useShowEmbedModal } from '../hooks';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user