mastilver / dynamic-cdn-webpack-plugin

Get your dependencies from a cdn rather than bundling them in your app
MIT License
343 stars 37 forks source link

Allow url to be an array #54

Closed zhangtemplar closed 5 years ago

zhangtemplar commented 6 years ago

In certain library, it may contain multiple files, e.g., https://unpkg.com/rc-drawer-menu@0.5.7/dist/, one for source code, the other for style file or locale file.

codecov-io commented 6 years ago

Codecov Report

Merging #54 into master will decrease coverage by 1.1%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
- Coverage   98.83%   97.72%   -1.11%     
==========================================
  Files           2        2              
  Lines          86       88       +2     
==========================================
+ Hits           85       86       +1     
- Misses          1        2       +1
Impacted Files Coverage Δ
src/index.js 97.64% <66.66%> (-1.15%) :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 d3e6ae1...fb16359. Read the comment docs.

aulisius commented 6 years ago

Hi @zhangtemplar , thanks for the PR! All looks good. Can you also add some tests to test against this usecase?

Thanks, Faizaan.

zhangtemplar commented 6 years ago

@aulisius sure, give me some time. I found some problem when running the new test.

mastilver commented 6 years ago

Hi @zhangtemplar , thank you for the PR. But I don't think it will work

Please tell me if I'm wrong but with your example rc-drawer-menu and without the this webpack plugin, you will need to import each of them one by one; this plugin doesn't change anything and is not suppose to change previous behaviours: if it was working before, it should still work

What we need to do is work on #12 and for module-to-cdn to handle multiple types of assets (css, js, ...)

zhangtemplar commented 6 years ago

Got you!

mastilver commented 5 years ago

closing that, based on above conversation