Compatibility with ESM (webcomponents), using in pure js without React & NodeJS in context
维护者通常 1 天内回复
@draedful 已经在做这个了。
开始于 2025年3月10日。
评估
这个 Issue 还没有评估数据。
描述
I am trying to use the @gravity-ui/graph library within a pure JavaScript environment, specifically with web components and without relying on React or NodeJS. I'm encountering challenges related to ESM compatibility.
Specific Use Case:
- Web component-based application
- No React framework
- No NodeJS backend (purely front-end)
- Using standard JavaScript modules (ESM)
Problem:
I am having trouble importing and utilizing @gravity-ui/graph within this setup. It seems there might be compatibility issues when trying to load the library as an ESM module in a browser environment without a bundler typically used in React or NodeJS projects.
Expected Behavior:
I would expect to be able to import @gravity-ui/graph directly into my web component using standard ESM import syntax and use its functionalities without requiring a complex build process or dependencies on React/NodeJS.
Possible Solutions/Requests:
- Could you provide guidance on how to properly import and use
@gravity-ui/graphin a pure JavaScript/ESM environment? - Are there any specific configurations or build steps required to make it compatible with web components?
- Would it be possible to provide an ESM build of the library that is optimized for browser usage without NodeJS dependencies?
- Example usage in pure JS (webcomponents) would be helpful.
To the Gravity-UI Team:
Thank you for your work on this library! I believe that making it more easily accessible in pure JavaScript/ESM environments would greatly expand its potential user base.
- 主要语言
- TypeScript
- 星标
- 145
- 派生
- 12
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 43
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
gravity-ui/graph 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
gravity-ui/graph#457 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
gravity-ui/graph#455 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
gravity-ui/graph#456 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
gravity-ui/graph#431 ·
维护者通常 1 天内回复
-
proposal
难度 5/5 一周以上 新手友好度 25/100
gravity-ui/graph#416 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
software-mansion/argent#1946 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 63/100
podman-desktop/podman-desktop#20216 ·
维护者通常 1 天内回复
-
[Type] Bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
omdsh-dev/DSH-better-sidebar#1205 ·
维护者通常 3 天内回复