修复plugin在使用npm安装时无法引用的bug
Open
- Dominant language
- JavaScript
- Stars
- 1.6k
- Forks
- 441
- PR merge metrics
- No merged PRs in 30d
Description
修复iSlider的plugin全局能用,npm包不能用的问题。
Bug描述:npm安装后根据package.json的main配置,入口文件是build/index.bundle.js,但实际上plugins中使用require('./iSlider')的引用方式只能调用src/js/iSlider.js中的plugin,因此会出现采用npm时二者不一致的情况。
解决方案:将plugins插件中的引用iSlider组件的代码由require('./iSlider')改为require('islider.js'),这样无论是全局还是npm,都能引用正确的iSlider组件。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing package.json, build/index.bundle.js, src/js/iSlider.js, and the plugin files that require iSlider. Compare the package entry point with the plugin import path, then verify that the plugins resolve the correct component when installed through npm and when used globally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100