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

Should not throw on missing modules #1

Closed
mastilver opened this issue Apr 10, 2017 · 1 comment
Closed

Should not throw on missing modules #1

mastilver opened this issue Apr 10, 2017 · 1 comment

Comments

@mastilver
Copy link
Owner

mastilver commented Apr 10, 2017

It should just log a warning instead

@shirotech
Copy link

shirotech commented Apr 24, 2017

Just the plugin I was looking for, I'm surprised it does not exist anywhere else yet. Nice work so far 👍

When a module is not found I'm getting this:

throw new Error(`'${moduleName}' is not available through cdn, add it to https://github.com/mastilver/module-to-cdn/blob/master/modules.json if you think it should`);

Would it be possible to add an option which can be additional to the modules.json file, rather than needing to do a pull request every time it doesn't find it.

i.e.

new ModulesCdnWebpackPlugin({
  additional: {
    "vue": {
      "var": "Vue",
      "url": "https://unpkg.com/vue@[version]/dist/vue.runtime.min.js"
    }
  },
  modules: ['vue']
})

This would make it much more flexible and less opinionated, what are your thoughts?

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants