Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

"file" loader for json-refs not supported? #2

Open
jlowcs opened this issue Jan 28, 2016 · 1 comment
Open

"file" loader for json-refs not supported? #2

jlowcs opened this issue Jan 28, 2016 · 1 comment

Comments

@jlowcs
Copy link

jlowcs commented Jan 28, 2016

How was/is built this index.js file? I can see that the code is not exactly the same as the code from the libs it seems to be built on.

For instance, the way it handles the "file" scheme for json-refs is not the same as the one from path-loader (https://github.com/whitlockjc/path-loader/blob/v1.0.1/lib/loaders/file.js).

I'm currently trying to embed swagger-editor in node-webkit, and I'm having trouble with the "file" scheme, as I'm currently getting a The 'file' scheme is not supported in the browser error when using a file://location.

I can understand why the code cannot use fs, as it's in a worker. But it seems to me it could nonetheless try using a xhr request for filerequests.

Is there any way I could submit a merge request for that?

@mohsen1
Copy link
Collaborator

mohsen1 commented Jan 28, 2016

the way this module is built is just sway.min.js + a little worker API at the end. Any issues you have is possibly because of Sway. More likely Sway in a web worker context.

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

No branches or pull requests

2 participants