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

npm run build导出的dist如何打开?双击直接打开还是需要部署之类? #247

Closed
FatFatFox opened this issue May 4, 2017 · 10 comments

Comments

@FatFatFox
Copy link

问题比较low
我在之前的非roadhog版本中做的例子,是可以直接在dist目录里双击网页文件打开执行,并且可以和后台数据交互的(我计划是把dist目录的前端文件放在tomcat和java交互)。
但是更新到昨天的版本,貌似是不能直接双击执行的。不知道要做什么调整,请教各位。

@FatFatFox
Copy link
Author

image
我调整了一下index.html的关联文件的方式(不调整的话报找不到index.js和index.css错误)
双击执行后
image

@chimisu
Copy link

chimisu commented May 4, 2017

部署到nginx上就行

@FatFatFox
Copy link
Author

@doterme @zuiidea
已经部署到了nginx上,但是症状和下面这位遇到的问题是一样的
#252

@zuiidea
Copy link
Owner

zuiidea commented May 8, 2017

nginx配置示例:

server
	{
		listen       666;
		server_name 47.92.30.98;
		root  /home/www/antd-admin/dist;

		location /api {
			 proxy_pass http://localhost:8000/api;
		}

		location / {
				index  index.html;
				try_files $uri $uri/ /index.html;
		}
	}

演示地址:http://47.92.30.98:666

@zuiidea zuiidea closed this as completed May 8, 2017
@yanghong1105
Copy link

您好,npmrun build是空白的问题怎么解决的,我现在也是这种情况

@zuiidea
Copy link
Owner

zuiidea commented May 9, 2017

@yanghong1105 #269

@change9326
Copy link

@FatFatFox 你好 请问你是如何部署到tomcat 下的,谢谢

@FatFatFox
Copy link
Author

我还没试,只是在nginx上试成功了,现在在忙别的事情,试成功了告诉你,如果你搞成功了也烦请告诉我。

@mapengze
Copy link

@FatFatFox 试成功了吗 如何在tomcat上部署啊 就解啊 大神

@ivsass
Copy link

ivsass commented Sep 29, 2019

@FatFatFox你好请问你是如何部署到tomcat下的,谢谢
你好 ,你们成功了吗? 我选择也在面临部署问题

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

7 participants