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

GH-591 fix sw being loaded from CDN #1328

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kencanak
Copy link

What kind of change does this PR introduce?
Bug Fix, this will close #591

  • refactored entry.js to use process.env.SW_PATH instead of webpack public path
  • introduced new cli option for setting swPath, default would be /

Did you add tests for your changes?
N/A, did a local test though

Summary
Service Worker loaded from CDN, see #591 for more details

Does this PR introduce a breaking change?

don't think so

Kencana Kesuma and others added 4 commits July 16, 2020 15:13
@prateekbh
Copy link
Member

I am still thinking if adding one more flag is the right thing to do here or can we handle it differently

Copy link
Member

@prateekbh prateekbh left a comment

Choose a reason for hiding this comment

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

I dont think this needs a new flag.

cc: @developit

packages/cli/lib/lib/entry.js Outdated Show resolved Hide resolved
@developit
Copy link
Member

Can't this just always use __webpack_public_path__? It defaults to "/".

@prateekbh
Copy link
Member

I guess people would sometimes like to build the app for a subfolder? like /shop?

Kencana Kesuma added 2 commits July 30, 2020 11:29
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.

Service Worker loaded from CDN
3 participants