Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大佬,npm引入后项目本地没问题,但是项目在构建后报错是为啥啊 #51

Closed
starSinking opened this issue Oct 13, 2022 · 9 comments

Comments

@starSinking
Copy link

starSinking commented Oct 13, 2022

vue3版本,element-plus,vite构建
报错如下:
image
是在构建后的这块
image
对应的源码好像是
image
这个位置

@starSinking
Copy link
Author

  1. 本地起来正常的的长这样:

好的1
好的2
好的3

  1. vite打包之后出问题:

坏的1
坏的2
坏的3

这是vite配置的问题吗?

@xaboy
Copy link
Owner

xaboy commented Oct 13, 2022

感谢反馈, 我这边检查一下 @starSinking

@xaboy
Copy link
Owner

xaboy commented Oct 14, 2022

是不是打包的时候没有把 form-create 打包进去

@starSinking
Copy link
Author

不会吧,我在main.js中注释掉引入的designer,保留form-create,单独使用form-create的情况下打包好是正常的,引入designer就报错了。

@starSinking
Copy link
Author

我用vite重新创建了一个干净的项目,下载好element plus以及form-create-designer后打包好还是报同样的错
image

image
image

@xaboy
Copy link
Owner

xaboy commented Oct 15, 2022

image

手动修改一下 @form-create/deisnger 包中 package.json 文件,然后重新打包试试 @starSinking

    "unpkg": "./dist/index.umd.js",
    "jsdelivr": "./dist/index.umd.js",
    "typings": "./types/index.d.ts",
    "main": "./dist/index.umd.js",
    "module": "./dist/index.es.js",
    "exports": {
        ".": {
            "import": "./dist/index.es.js",
            "require": "./dist/index.umd.js"
        }
    },

@starSinking
Copy link
Author

好了,感谢

@xaboy
Copy link
Owner

xaboy commented Oct 18, 2022

好的, 下个版本修复

@xaboy
Copy link
Owner

xaboy commented Oct 23, 2022

3.0.2版本已修复

@xaboy xaboy closed this as completed Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants