baidu / amis

前端低代码框架,通过 JSON 配置就能生成各种页面。
https://baidu.github.io/amis/
Apache License 2.0
17.1k stars 2.48k forks source link

在node_modules里面使用sdk加载不到thirds这个目录 #2655

Closed SheenaghF closed 7 months ago

SheenaghF commented 2 years ago

描述问题:

在node_modules里面使用sdk加载不到thirds这个目录

截图或视频:

可以的话,尽可能提供截图或视频来补充描述你的问题...

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的? npm

  2. amis 版本是什么? 1.3.0

  3. 粘贴有问题的完整 amis schema 代码: { "type": "page", "body": { "type": "form", "api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/form/saveForm", "body": [ { "type": "json-editor", "name": "editor", "disabled": true, "label": "JSON编辑器" } ] } }

  4. 操作步骤 image

nwind commented 2 years ago

大概是 vite 兼容性问题,应该主要是 vite 功能欠缺导致,还没空研究,先用 snowpack 吧

joker77877 commented 2 years ago

都快一年了,这个问题不能修复一下吗,vite也是主流工具了

joker77877 commented 2 years ago

描述问题:

在node_modules里面使用sdk加载不到thirds这个目录

截图或视频:

可以的话,尽可能提供截图或视频来补充描述你的问题...

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的? npm
  2. amis 版本是什么? 1.3.0
  3. 粘贴有问题的完整 amis schema 代码: { "type": "page", "body": { "type": "form", "api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/form/saveForm", "body": [ { "type": "json-editor", "name": "editor", "disabled": true, "label": "JSON编辑器" } ] } }
  4. 操作步骤 image

请教一下之前这个问题解决了吗

Lisheri commented 7 months ago

请问上述问题解决了吗, vite构建vue3项目, skd内部的引入逻辑是这样的 6e7597a1-419d-42ad-a1e5-9f5730b71872

2betop commented 7 months ago

用 vite-plugin-static-copy 直接将 sdk 文件复制过去,不要进行二次编译。

参考 : https://github.com/aisuda/vue2-amis-demo 的 main 分支,可以正常渲染

![Uploading image.png…]()

Lisheri commented 7 months ago

牛逼大哥, 非常完美, 已经解决了~

2betop commented 7 months ago

这个 issue 先关了,有问题再开

Lisheri commented 7 months ago

很丝滑~感谢老哥~