-
Notifications
You must be signed in to change notification settings - Fork 104
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
Wrong path to assets when built on windows #11
Comments
Yup thats exactly what that should do. What is your output path in your webpack configuration? Does it log the same as |
In index.js, console.log(outputPath);
console.log(staticFileGlobs); gives
|
I encountered the same problem and got around it by adding stripPrefix. Due to windows My sw-precache-config:
|
Thanks @terjebra that worked for me. |
@terjebra @davidgilbertson I think this should be fixed in sw-precache-webpack-plugin/src/index.js Line 87 in 9646bcb
Would either of you mind testing it? |
Just tested, does not work still. Need to add the |
Hi, I have the same issue, but I guess the problem resides in sw-precache and how it processes stripPrefix |
@terjebra's example is expecting the configuration to be located in the same folder as the dist folder. make sure path.join(__dirname, 'dist') actually does point to your dist folder (or whatever you have as output folder) |
sw-precache-webpack-plugin also automatically sets
|
The same bug is on osx. |
As a heads-up, this was raised in facebook/create-react-app#2235, and seems like it could be a blocking issue for all Windows developers. If there is an easy fix for the plugin, note that we're using |
Going to try adding the |
@goldhand that is exact workaround I use in my project:
tested on windows/mac os :) |
Thanks @sqal that looks great 😄 |
Add strip prefix multi windows support (fixes #11)
Didn't mean to auto close this. The fix will be in |
fixed and published in |
Any configuration I'm missing, or is there a bug? It's working fine when building on my mac, but our build server is running TeamCity/Windows.
My config:
Isn't https://github.com/goldhand/sw-precache-webpack-plugin/blob/master/src/index.js#L66 this supposed to strip away this?
The text was updated successfully, but these errors were encountered: