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

--no-unsafe-line generates root url in precache manifest #3033

Closed
DorianGrey opened this issue Nov 28, 2018 · 0 comments · Fixed by #3647
Closed

--no-unsafe-line generates root url in precache manifest #3033

DorianGrey opened this issue Nov 28, 2018 · 0 comments · Fixed by #3647

Comments

@DorianGrey
Copy link

Version

3.2.1

Reproduction link

https://github.com/DorianGrey/vue-ts-playground

Node and OS info

Node 10.13 / yarn 1.12.3 / any OS

Steps to reproduce

  • Checkout the reproduction repo.
  • yarn for installing dependencies
  • yarn build --no-unsafe-inline

Inspect build/precache-manifest.* afterwards.

What is expected?

The entry for the safari-nomodule-fix.js should contain a relative URL so that it can be cached by the service worker.

What is actually happening?

The precache-manifest for the modern part contains an entry for the safari-nomodule-fix.js with a root url, like:

{
  "revision": "3e20c054c9be1ad3a7dfca6f4cfe8939",
  "url": "//js/safari-nomodule-fix.js"
}

When the service worker tries to use this url, it ends up with something like https://js/safari-nomodule-fix.js, which cannot be used.


Ran into this bug when trying to avoid modification of the CSP header to contain a hash. While this is less problematic for me (since I have full control over this header), it might be a larger issue for others.

@haoqunjiang haoqunjiang added the needs team repro We acknowledged your report and will soon try to reproduce it label Dec 13, 2018
@haoqunjiang haoqunjiang added bug work-in-progress scope: cli-service build and removed needs team repro We acknowledged your report and will soon try to reproduce it labels Mar 14, 2019
haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Mar 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants