-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
开发/生产环境与后端交互(新手必读) #91
Comments
打包以后,项目没有放在服务器跟目录,导致访问不到css和js,怎么修改路径呢? |
打包了用的 History 模式路由,必须放在 web 容器内,否则更换路由模式 |
我想知道你们mock数据是怎么mock的 不是vue.config.js 因为我注释了 照样可以mockd到数据 |
使用的 easy-mock ,这是一个在线的 mock ,只要你有网,就能拉到数据 |
直接copy项目之后,什么都没改,打包,放到tomcat上,域名或者IP 访问,接口都报错404?需要后端配置什么吗? |
打包后不会提供 mock 数据 |
项目执行build打包后,js文件显示无法加载。打包项目无法使用 |
@aixinaxc 请描述清楚 |
就是生产dist后,我想不采用web容器直接启动该如何做 |
devServer: {
|
@liupchina 请不要在此 issue 提问。 |
devServer: { 配置了devServer 为什么请求还是mock的数据? |
如何在开发环境,生产环境访问后端接口
与 devServer 相关的问题请自行查询 API 文档,未给出链接的,请自行百度谷歌
基础知识须知
开发环境采用
Webpack
的devServer
Cli3 配置
也可以参考 Github 上其他开源者的 devServer 配置项
ref https://github.com/PanJiaChen/vue-element-admin/blob/master/vue.config.js
生产环境
参考 Issue #41
Pro 官方文档
参考文档 https://pro.antdv.com/docs/deploy
注: 请不要在本 Issue 提问
The text was updated successfully, but these errors were encountered: