-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Generated service worker uses file paths under Windows 10 #2235
Comments
Paging @jeffposnick for help. |
That's not good. I just found goldhand/sw-precache-webpack-plugin#11 which indicates that this is a known problem with the Webpack wrapper to I'm going to experiment and see if it's possible to pass in a safe, default |
Given that many other tools are broken on Windows, we have historically made it a point to ensure that every Create React App feature is supported and works well on Windows. This issue is a high priority for us and any help or temporary workaround would be welcome (even a hacky one). |
Definitely understood. I'm actively investigating whether there's a clean workaround short of requiring a new version of |
@jeffposnick I've heard that setting |
I have a Windows laptop so I can verify any fix if you explain how to check that it works. |
Do I understand correctly that I'd need to adjust that to be |
Or, rather, just path of my |
sorry, yes just the path to the build folder. I think |
OK, I think #2255 helps in my testing. Thanks everybody for raising this and suggesting fixes. |
@gaearon, I will be working on a permanent fix. |
Thanks so much for stepping in with that workaround, @goldhand! As a heads-up, I've been trying to confirm that it works as intended for common c-r-a use cases, and I am seeing an issue where using that I am going to continue trying different scenarios, but I wanted to point out that this setting appears to be an issue for |
{
stripPrefix: (paths.appBuild + '/').replace(/\\/g, '/'),
} is roughly equivalent, but with the additional property of stripping out the leading |
Ah, thanks for catching that. |
I assume just |
That seems equivalent, yeah. Though I am not by a machine to test right now.
…On May 19, 2017 11:40 AM, "Dan Abramov" ***@***.***> wrote:
I just paths.appBuild.replace(/\\/g, '/') + '/' would work, right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2235 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABqyLJoSLouC_HDCIZRm4VPoNvPMyNoZks5r7eIJgaJpZM4NgWkJ>
.
|
|
Tested and I can confirm it works for me. Thanks to all involved, this is an impressive turnaround time! |
Just published 0.9.2 on npm with the windows fix. It's here: goldhand/sw-precache-webpack-plugin#77 |
Can you reproduce the problem with latest npm?
Yes, I upgraded to the npm version 4.6.1 and the proble is reproducible
Description
Under windows, in a brand new project created with create-react-app, the service worker uses the location on disk of the files to be cached in its cache configuration.
Expected behavior
The service worker uses the proper URLs for caching configuration
Environment
react-scripts@1.0.0
node v6.10.1
npm 4.6.1
Windows 10
Any browser (not a browser issue)
Reproducible Demo
Create a brand new app with create-react-app in the environment above, run
npm run build
, and check the contents of service-worker.js. It contains file paths, such asThe text was updated successfully, but these errors were encountered: