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

app tries load bundle from disc root #31

Closed
Zuzon opened this issue Apr 7, 2016 · 8 comments
Closed

app tries load bundle from disc root #31

Zuzon opened this issue Apr 7, 2016 · 8 comments

Comments

@Zuzon
Copy link

Zuzon commented Apr 7, 2016

GET file:///D:/main.bundle.js net::ERR_FILE_NOT_FOUND

tried change 'relativePaths' and 'scope' settings, they has no effect

@NekR
Copy link
Owner

NekR commented Apr 7, 2016

Hi @Zuzon

How do you run it? From server/webpack-dev-server/direct from disk?

@NekR
Copy link
Owner

NekR commented Apr 7, 2016

Also, if it's possible, can you show what SW/AppCache plugin generates for you?

@Zuzon
Copy link
Author

Zuzon commented Apr 7, 2016

appcache:

CACHE MANIFEST
#ver:v1

CACHE:
../0ac1be82bd79e6be47a32376d286480f.png
../polyfills.bundle.js
../vendor.bundle.js
../main.bundle.js
...

How do you run it?

simply open index.html as file

in index.html
<script src="polyfills.bundle.js"></script><script src="vendor.bundle.js"></script><script src="main.bundle.js"></script></body>

scripts are in same directory with index.html

@NekR
Copy link
Owner

NekR commented Apr 7, 2016

SW is not supposed to work this way. AppCache, even it can, there is not reason for it to work. I tested path generation only with usage on servers, so may fail with file:.

Btw, what is the problem running/testing it with server? I use http-server which is pretty easy to work with:

npm install http-server -g # install
http-server # run in output folder

@Zuzon
Copy link
Author

Zuzon commented Apr 7, 2016

my project is a bit specific.
i need to create a desktop .net app, on this app i integrate gecko browser engine and also that engine runs my web app in offline without webserver

@NekR
Copy link
Owner

NekR commented Apr 7, 2016

@Zuzon hmm.. okay, I will check file: support. But, are you sure AppCache is working with file: protocol?

@Zuzon
Copy link
Author

Zuzon commented Apr 8, 2016

NekR, i found a reason of path problem, because i have baseUrl with slash set (/), with empty string all works perfectly.
I'm sorry to have kept spending your time.

@NekR
Copy link
Owner

NekR commented Apr 8, 2016

@Zuzon no problem! Glad that it works for you know. Feel free to open another issue if something :-)

@NekR NekR closed this as completed Apr 8, 2016
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

2 participants