We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
通过通过beidou init 生成的Simple项目。在beidou build后,通过beidou start启动服务,打开浏览器查看页面,发现静态资源的请求都返回404。通过beidou dev启动服务器时没有这个问题。
beidou init
beidou build
beidou start
beidou dev
在beidou build后,通过beidou start启动服务,打开浏览器查看页面,发现静态资源的请求都返回404。
在beidou build后,通过beidou start启动服务,打开浏览器查看页面,可以成功返回静态资源文件。
The text was updated successfully, but these errors were encountered:
config.prod.js:
module.exports = { static: { dynamic: false, preload: true, }, };
https://github.com/alibaba/beidou/blob/master/packages/beidou-core/config/config.prod.js#L10 此处配置 dynamic: false, 需要配合 preload: true 使用, 否者会出现找不到文件
dynamic: false
preload: true
或者修改 dynamic: true 也可以解决
dynamic: true
Sorry, something went wrong.
fix: static config in prod mode #38
3083b4e
fix: static config in prod mode #38 (#42)
a456874
真实原因应该是用了beidou组件后原来的egg-static的静态资源目录被移动到了/build下面,如果放在app/public下面的话 就会报404
No branches or pull requests
通过通过
beidou init
生成的Simple项目。在beidou build
后,通过beidou start
启动服务,打开浏览器查看页面,发现静态资源的请求都返回404。通过beidou dev
启动服务器时没有这个问题。Current behavior
在
beidou build
后,通过beidou start
启动服务,打开浏览器查看页面,发现静态资源的请求都返回404。Expected behavior
在
beidou build
后,通过beidou start
启动服务,打开浏览器查看页面,可以成功返回静态资源文件。The text was updated successfully, but these errors were encountered: