opentiny / opentiny/tiny-engine
🐛 [Bug]: 引入自定义组件,如何解决外部依赖的问题
Open
Nobody has claimed this yet.
question
- Dominant language
- Vue
- Stars
- 2.8k
- Forks
- 476
- Avg merge
- 17h 35m
- Merged PRs (30d)
- 1
Description
Environment
谷歌
Version
20
Version
LATEST
Link to minimal reproduction
null
Step to reproduce
我想引入我自定义的组件:https://unpkg.com/xsm-test001@1.2.1/dist/index.js
我这个包会有一定的依赖 比如
import { useEventBus } from '@vueuse/core';
import axios from 'axios';
在materials中引入这个组件后 会有报错
我该如何添加这些依赖,或者我打包必须也把这些依赖也打出来吗?
What is expected
给出一个解决外部依赖的解决方案
What is actually happening
缺失依赖引用会报错
What is your project name
null
Any additional comments (optional)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the import of https://unpkg.com/xsm-test001@1.2.1/dist/index.js in materials, using the reported @vueuse/core and axios imports. Trace how TinyEngine resolves dependencies for custom components and document a verified solution for making those external dependencies available; the issue is done when the component loads without missing-dependency errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100