Skip to content

Conversation

@rschristian
Copy link
Member

@rschristian rschristian commented Nov 19, 2021

What kind of change does this PR introduce?

Bug fix

Did you add tests for your changes?

No

Summary

With ESM disabled, InjectManifest used join(src, sw.js) to get the service worker path. If this did not exist (if the user [re]moved the file), the build would error out.

We already had a system set up to catch this and fall back to the one provided from preact-cli, just weren't using it on non-esm builds.

Does this PR introduce a breaking change?

No

@rschristian rschristian requested a review from a team as a code owner November 19, 2021 01:14
@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2021

🦋 Changeset detected

Latest commit: cfb62a3

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

"style-loader": "^2.0.0",
"terser-webpack-plugin": "^4.2.3",
"typescript": "^4.2.4",
"typescript": "~4.2.4",
Copy link
Member Author

@rschristian rschristian Nov 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is completely unrelated. I could move into a separate PR if desired.

From what I understand, Yarn needs to manually patch some dependencies like TS on every release. TS 4.5 just came out, which apparently caused some issues in the PnP pipeline.

Restricting this to a patch/TS minor should be fine I believe, and works around PnP breakages in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eh, if it makes CI pass leave it in.

@ForsakenHarmony ForsakenHarmony merged commit 11d5f3b into master Nov 19, 2021
@ForsakenHarmony ForsakenHarmony deleted the fix/sw-src branch November 19, 2021 16:49
@preact-bot preact-bot mentioned this pull request Nov 19, 2021
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.

4 participants