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

打包生成dist后在playground下执行server 后画布没展示内容 #352

Closed
Carloslst opened this issue Sep 17, 2022 · 6 comments · Fixed by #357
Closed

打包生成dist后在playground下执行server 后画布没展示内容 #352

Carloslst opened this issue Sep 17, 2022 · 6 comments · Fixed by #357

Comments

@Carloslst
Copy link

你好,请问一下,我得到dist包后 画布没展示内容,浏览器式提示server问题 我看到是代理问题,然后我在整个项目的根目录启动项目,这个时候dist包在 preview下画布才能展示。
1663417047624

1663417392785

这里不能在playground目录下直接preview后画布出现内容吗,要是在服务器上,这个dist包会不会也出现这种情况呢

@jia000
Copy link
Collaborator

jia000 commented Sep 19, 2022

没看懂你的问题具体是什么
playground打包的产物,可以看
https:/Tencent/tmagic-editor/tree/gh-pages/playground
这个是https://tencent.github.io/tmagic-editor/playground/index.html#/ 的资源

@Carloslst
Copy link
Author

没看懂你的问题具体是什么 playground打包的产物,可以看 https:/Tencent/tmagic-editor/tree/gh-pages/playground 这个是https://tencent.github.io/tmagic-editor/playground/index.html#/ 的资源

你好,上面那个截图是playground打包的产物 然后我执行了vite preview 执行了dist包,但是执行起来后画布中初始化的组件没有展示出来

@jia000
Copy link
Collaborator

jia000 commented Sep 19, 2022

vite preview还是会使用vite.config.ts里的配置,里面配置proxy,把runtime的index代理到了8087端口(这个是dev的时候需要)

@Carloslst
Copy link
Author

vite preview还是会使用vite.config.ts里的配置,里面配置proxy,把runtime的index代理到了8087端口(这个是dev的时候需要)

你好,那我这个dist包发到生产的时候,这个时候需要改动些什么吗?

@jia000
Copy link
Collaborator

jia000 commented Sep 19, 2022

对url 路径没有要求的话就不需要改动什么了

@Carloslst
Copy link
Author

对url 路径没有要求的话就不需要改动什么了

谢谢,麻烦了

jia000 pushed a commit that referenced this issue Sep 19, 2022
由于vite.config.ts中配置了proxy,run serve的时候是不需要proxy的

fix #352
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

Successfully merging a pull request may close this issue.

2 participants