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

能否支持public文件夹? #26

Closed
carter8225 opened this issue Jul 26, 2020 · 3 comments
Closed

能否支持public文件夹? #26

carter8225 opened this issue Jul 26, 2020 · 3 comments

Comments

@carter8225
Copy link

遇到两个跟public文件夹有关的问题:

  1. dev环境运行时找不到favicon.ico,默认vue ssr好像是放在public文件夹;
  2. 添加tinymce组件时,需要引用静态文件skins(css和js)等,因此要预先将skin文件添加到public文件夹;

尝试过直接将静态文件放在dist/server文件夹下面,编译时会重置。

请求帮助,或者有更好的解决方法,还请赐教,感谢

@lzxb
Copy link
Contributor

lzxb commented Jul 27, 2020

自己使用 express 来处理静态目录即可、

app.use(
    '/public/',
    express.static(你的路径)
);

@lzxb
Copy link
Contributor

lzxb commented Jul 27, 2020

如果你使用的是TS,编译的时候,记得把public 目录,复制到TS编译后的对应目录下

@lzxb lzxb closed this as completed Jul 27, 2020
@carter8225
Copy link
Author

@lzxb 谢谢帮助,已经可以了

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