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

The swSrc file refers to a sourcemap that can't be opened #2957

Closed
RandomEngy opened this issue Oct 10, 2021 · 3 comments · Fixed by #2959
Closed

The swSrc file refers to a sourcemap that can't be opened #2957

RandomEngy opened this issue Oct 10, 2021 · 3 comments · Fixed by #2959
Assignees
Labels
Developer Experience Related to ease of use for developers. workbox-build

Comments

@RandomEngy
Copy link

Library Affected:
workbox-build

Browser & Platform:
all browsers

Issue or Feature Request Description:

I'm running injectManifest in development mode, but it's erroring out:

The swSrc file refers to a sourcemap that can't be opened: ENOENT: no such file or directory, open 'D:\a_work\1\s\CacheStatus.js.map'

I checked the swSrc file and the first sourcemap is indeed //# sourceMappingURL=CacheStatus.js.map . However the file being injected is output to a folder without the sourcemaps beside them. This was working fine in v4, but is broken in v6. Can we update the behavior to ignore the invalid sourcemap and continue with the manifest injection? Or add an option to do so?

`${errors['cant-find-sourcemap']} ${

@jeffposnick
Copy link
Contributor

I'm not entirely sure why that logic would have changed between v4 and v6, but if you have a development set up that's broken by this exception, I think we can "demote" it to be a warning instead.

@jeffposnick jeffposnick added Developer Experience Related to ease of use for developers. workbox-build labels Oct 11, 2021
@RandomEngy
Copy link
Author

RandomEngy commented Oct 11, 2021

Awesome! If I submitted a PR would it help make it happen faster?

@jeffposnick
Copy link
Contributor

The logic is a little funky, so I'm fine with writing the PR. Stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Experience Related to ease of use for developers. workbox-build
2 participants