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

doesn't parse other libraries #45

Closed geoshar closed 6 years ago

geoshar commented 6 years ago

It parses only jquery, or some other libraries like react maybe, but it doesn't include all the libraries on the node_modules for example import Clipboard from 'clipboard'; so, how to solve this?

aulisius commented 6 years ago

Hey :)

You'd have to create a PR and add the appropriate JS file links here: https://github.com/mastilver/module-to-cdn

geoshar commented 6 years ago

Thanks! i've inserted like this:

moduleToCdn('video.js', '6.6.0',{ env: 'production' });

i don't see a link on manifest.json, only jquery goes

mastilver commented 6 years ago

This is the file you need to update: https://github.com/mastilver/module-to-cdn/blob/master/modules.json

Because every module is different, we need to configure it for each modules

geoshar commented 6 years ago

Hey Thanks! I've looked into this, and created another way to do a similar thing, without manifest.json, and no modules.json needed, just a 5kb autoloader.js which will load everything, depending on what you included into this. autoloader-cdn