diff --git a/.dumirc.ts b/.dumirc.ts index 9e872696..2d8caaab 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -1,5 +1,6 @@ // more config: https://d.umijs.org/config import { defineConfig } from 'dumi'; +import path from 'path'; const basePath = process.env.GITHUB_ACTIONS ? '/util/' : '/'; const publicPath = process.env.GITHUB_ACTIONS ? '/util/' : '/'; @@ -14,4 +15,7 @@ export default defineConfig({ exportStatic: {}, base: basePath, publicPath, + alias: { + 'rc-util/es': path.resolve(__dirname, 'src'), + }, }); diff --git a/docs/examples/focus.tsx b/docs/examples/focus.tsx index 7e7ae662..1330e338 100644 --- a/docs/examples/focus.tsx +++ b/docs/examples/focus.tsx @@ -1,6 +1,5 @@ import React, { useRef } from 'react'; import { useLockFocus } from '../../src/Dom/focus'; -import './focus.css'; export default function FocusDemo() { const containerRef = useRef(null); diff --git a/tsconfig.json b/tsconfig.json index 40a6277b..7ab37155 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "paths": { "@/*": ["src/*"], "@@/*": ["src/.dumi/*"], - "rc-util": ["src/index.tsx"], + "rc-util": ["src/index.ts"], "rc-util/es/*": ["src/*"] } }