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

关于静态资源的引用 #25

Closed
jinhuiWong opened this issue Sep 15, 2017 · 7 comments · Fixed by #50
Closed

关于静态资源的引用 #25

jinhuiWong opened this issue Sep 15, 2017 · 7 comments · Fixed by #50

Comments

@jinhuiWong
Copy link

不支持加载本地js和css文件吗?内网用不了啊。。。。。。
image

@lujjjh
Copy link
Contributor

lujjjh commented Sep 15, 2017

不能访问外网的话确实有问题。理论上全部内联就可以了,不过那样体积会很大,我再想想。

@gemmi
Copy link

gemmi commented May 13, 2019

这个问题现在有解决方案吗?我们也遇到了相同的问题,内网无法使用

@lujjjh
Copy link
Contributor

lujjjh commented May 13, 2019

@gemmi 请问你们接入用的是 nginx proxy_pass 的方案还是 Express / Koa 中间件的方案?

@YoungLee1992
Copy link

@lujjjh 怎么内联这些css和js啊 直接换路径编译后没法显示 浏览器解析后样式文件为空

@hewangjs
Copy link

hewangjs commented Nov 2, 2020

同样遇到了这个问题,有没有破解的方法

@jinhuiWong
Copy link
Author

人肉下载替换

lujjjh added a commit that referenced this issue Nov 3, 2020
Add { inline: true } options to inline stylesheets and scripts.

Fixes #25.
lujjjh added a commit that referenced this issue Nov 3, 2020
Add { inline: true } options to inline stylesheets and scripts.

Fixes #25.
lujjjh added a commit that referenced this issue Nov 3, 2020
Add { inline: true } options to inline stylesheets and scripts.

Fixes #25.
@lujjjh lujjjh closed this as completed in #50 Nov 3, 2020
@lujjjh
Copy link
Contributor

lujjjh commented Nov 3, 2020

Upgrade to restc@^0.5.0 and use

restc.koa2({ inline: true })

to inline external stylesheets and scripts in HTML.

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.

5 participants