require-vuejs icon indicating copy to clipboard operation
require-vuejs copied to clipboard

access my local html file by chrome

Open vimtt opened this issue 7 years ago • 4 comments

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?

vimtt avatar Jan 17 '18 07:01 vimtt

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 ./

edgardleal avatar Jan 17 '18 11:01 edgardleal

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.

vimtt avatar Jan 17 '18 12:01 vimtt

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

edgardleal avatar Jan 17 '18 14:01 edgardleal

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.

dennythecoder avatar Feb 25 '18 22:02 dennythecoder