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

files after built can not be opened directly in browser #667

Closed
gardenzjd opened this issue Jul 24, 2018 · 7 comments
Closed

files after built can not be opened directly in browser #667

gardenzjd opened this issue Jul 24, 2018 · 7 comments

Comments

@gardenzjd
Copy link

files after built can not be opened directly in browser, and can not be used in electron. we made some vuepress documents and hope to can be opened directly in browser or electron. but not deployed on a web server. how should we do?

@ulivz
Copy link
Member

ulivz commented Jul 25, 2018

Of course you cannot do that, you can only serve vuepress dist files under a static server. e.g. express.static or koa-static.

BTW, please follow the issue reporting guidelines.

@cihanzengin
Copy link

cihanzengin commented Aug 8, 2018

@ulivz you sure ? because it was doing in vue projects with some configuration like

build: {
    ...
    assetsPublicPath: '',
    ...
  }

and then was possible to use project directly in browser or in some standart ftp.

@ulivz
Copy link
Member

ulivz commented Aug 13, 2018

@cihanzengin

It's useful when you deploy your site to a root URL, But If your site is deployed to a non-root URL, you will need to set the base(i.e. PublicPath), so setting default PublicPath to '' doesn't solve the problem.

At the same time, the real production environment also uses a static server, so please use static server.

See also: #575 (comment)

@ulivz
Copy link
Member

ulivz commented Aug 13, 2018

Duplicate of #575

@ulivz ulivz marked this as a duplicate of #575 Aug 13, 2018
@cihanzengin
Copy link

@ulivz what is the static server mean ?
I'm using standard linux hosting. So may i need to some extra configuration on my hosting?
Because using vuepress project just on heroku, digital ocean etc some specific hosting providers too not logical.

@cihanzengin
Copy link

@ulivz i understand now the point :) sorry. Yes when i upload content of dist folder to root of my ftp everything works well.

now question is: where and with which configuration i can upload my builded vuepress projects to subfolder. not the root folder ?

@ghost
Copy link

ghost commented Sep 10, 2018

@cihanzengin You should check out base config.

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

3 participants