Skip to content

Second package into a library, refer to custom hooks in vitepress and report an error #6157

@az031120103

Description

@az031120103
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.11

Environment

macOS monterey 12.6
node 16.11.0
ant-design-vue 3.2.11

Reproduction link

https://github.com/az031120103/test

Steps to reproduce

git clone https://github.com/az031120103/test.git
npm run dev:ui
npm run dev:docs

What is expected?

正常显示

What is actually happening?

Form 组件的自定义 hooks useConfigInject 报错:

useConfigInject.js:71 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getPrefixCls')
at __WEBPACK_DEFAULT_EXPORT__ (useConfigInject.js:71:1)
at setup (Form.js:118:43)
at callWithErrorHandling (runtime-core.esm-bundler.js:157:22)
at setupStatefulComponent (runtime-core.esm-bundler.js:7246:29)
at setupComponent (runtime-core.esm-bundler.js:7201:11)
at mountComponent (runtime-core.esm-bundler.js:5524:13)
at processComponent (runtime-core.esm-bundler.js:5499:17)
at patch (runtime-core.esm-bundler.js:5101:21)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5638:21)
at ReactiveEffect.run (reactivity.esm-bundler.js:187:25)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions