webpack-contrib / file-loader

File Loader
MIT License
1.86k stars 255 forks source link

compatibility for chrome extension content script #373

Closed shadowsong91 closed 4 years ago

shadowsong91 commented 4 years ago

This PR contains a:

Motivation / Use-Case

When developing chrome extension, request urls for files will be like chrome-extension://${extension_id}/file, not http. These urls can be generated by calling chrome.runtime.getURL.

Breaking Changes

  1. Add useInChromeExtensionContentScript in options.
  2. When useInChromeExtensionContentScript === true, wrap publicPath with chrome.runtime.getURL.

Additional Info

jsf-clabot commented 4 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


zhoumo seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

codecov[bot] commented 4 years ago

Codecov Report

Merging #373 into master will decrease coverage by 3.22%. The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master     #373      +/-   ##
===========================================
- Coverage   100.00%   96.77%   -3.23%     
===========================================
  Files            2        2              
  Lines           29       31       +2     
  Branches        12       13       +1     
===========================================
+ Hits            29       30       +1     
- Misses           0        1       +1     
Impacted Files Coverage Δ
src/index.js 96.42% <50.00%> (-3.58%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3846b33...e85d8e8. Read the comment docs.