Skip to content

Resolve: Opening index.html over file:// won't work. #521

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

Closed
guilhermefsreis opened this issue Feb 15, 2017 · 4 comments
Closed

Resolve: Opening index.html over file:// won't work. #521

guilhermefsreis opened this issue Feb 15, 2017 · 4 comments

Comments

@guilhermefsreis
Copy link

guilhermefsreis commented Feb 15, 2017

Inside the file config/index.js altere o assetsPublicPath: '/' para assetsPublicPath: './' in build object

@egoist
Copy link
Contributor

egoist commented Feb 17, 2017

Imagine that you're using history mode, and ./ will always load resource from relative path, eg: at url /user/egoist the browser will load /user/egoist/bundle.js which will lead to 404 error.

So my suggestion is always using absolute path in publicPath

@asselin
Copy link

asselin commented Feb 18, 2017

To be able to use this with cordova, you have to be able to use relative paths, because 1) it uses file:// 2) the root is unpredictable. I agree with @guilhermefelipesilva that this should be fixed.

@egoist
Copy link
Contributor

egoist commented Feb 18, 2017

@asselin you can always change it in the config file, that's why it exists.

@asselin
Copy link

asselin commented Feb 18, 2017

Looking further, this is a dup of #200

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

4 participants