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

Refactor: Remove 'sw-debug.js' from prod output #1478

Merged

Conversation

rschristian
Copy link
Member

@rschristian rschristian commented Dec 2, 2020

What kind of change does this PR introduce?

Edit to build output

Did you add tests for your changes?

I updated existing tests

Summary

Closes #1477

User wanted to keep sw-debug.js out of builds when specifying --no-sw. We already didn't use the debug service worker on prod builds, but copied the file regardless.

This disables the debug service worker from being copied on production builds. I could add another check to make sure it's not copied on dev builds, but I feel like that's unnecessary. So long as the logic to keep it from being used is sound, we don't really need to worry about the copying of an extra file for dev.

Does this PR introduce a breaking change?

No

@rschristian rschristian requested a review from a team as a code owner December 2, 2020 03:25
@changeset-bot
Copy link

changeset-bot bot commented Dec 2, 2020

🦋 Changeset detected

Latest commit: 3804d07

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rschristian rschristian changed the title Refactor/remove sw debug from prod Refactor: Remove 'sw-debug.js' from prod output Dec 2, 2020
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

Successfully merging this pull request may close these issues.

sw-debug.js is included in build output when building with option --no-sw
2 participants