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

access my local html file by chrome #24

Open
vimtt opened this issue Jan 17, 2018 · 4 comments
Open

access my local html file by chrome #24

vimtt opened this issue Jan 17, 2018 · 4 comments

Comments

@vimtt
Copy link

vimtt commented Jan 17, 2018

Dear, for help:
I access my local html by chrome,the require-vuejs can't actually access the file by loadRemote method(not the loadLocal method), throwing error "Uncaught Error: Load timeout for modules: vue!business/samples/dialog/Dialog_unnormalized5...", how can I figure this out?

@edgardleal
Copy link
Owner

You should use a http server to server the content of your app.

If you have nodes installed on your machine, you can use http-server:

Install: nom install --save http-server

Run: node node_modules/http-server/bin/http-server ./

@vimtt
Copy link
Author

vimtt commented Jan 17, 2018

Thank you for your answering in time.

In fact, I had tried it for two way: accessing remote html file in the live server with vscode which I am sure it's OK and accessing local html file which not OK; but I will use it in hybrid app base on the cordova framework, should it work well?

Additionally, I notice that text.js can access local text file and css.js can also access local css file.

@edgardleal
Copy link
Owner

Great! Thanks for additional information. I will see what they are doing to load local files.

@dennythecoder
Copy link

but I will use it in hybrid app base on the cordova framework, should it work well?

Yes, Cordova will let you read the file structure using XMLHttpRequest which is what's going on here. Check your debugger and make sure your CSP is configured properly.

Modern browsers do not commonly allow for access to the file system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants