shirotech/webpack-cdn-plugin

Modules that are not in node_modules should be ignored

G-Rath opened this issue · 0 comments

Currently, if you setup a module for a package that isn't actually installed, it's version will be resolved to null, and it will be added to the html package:

<script type="text/javascript" src="https://unpkg.com/react-router@null/umd/react-router.js"></script>

Which a browser will attempt to load, and spit out a 404.

It would be better if instead this plugin ignored modules whos version resolves to null, as to let us define a single list of CDN modules that can be reused across projects without having to worry about if a project actually uses that module.