How do I load policies with Webpack?

All the examples I've found online for loading shims / polyfills in webpack are examples:

plugins: [  
    new webpack.ProvidePlugin({
          Promise: 'imports-loader?this=>global!exports-loader?global.Promise!es6-promise',
          fetch: 'imports-loader?this=>global!exports-loader?global.fetch!fetch'
     })
]

      

.. This is great, but what about polyfills that fix functionality rather than introduce new ones? IE, a customElement

polyfill for using WebComponents. There is not one specific global that maps to a polyfill, like Promise or Fetch. it increases significantly document.registerElement

.

How would you polyfill something like this in webpack? Example: https://github.com/webcomponents/custom-elements

+3
plugins webpack polyfills webpack-2


source to share


No one has answered this question yet

Check out similar questions:

2701
How do I get the values ​​of a query string in JavaScript?
1203
NPM vs. Bower vs. Browserify vs. Gulp vs. Grunt vs. Webpack
300
What is the point of HTML5 polyfills?
192
ES6 import using ('@') path entry in vue.js project using webpack
five
Promise.catch doesn't work in IE11 with polyfills
five
How to polyfill Array.prototype.find using webpack ProvidePlugin?
4
Webpack - provides multi-user fields
4
How is the global polyfill promise implemented in webpack v2?
3
How to use CustomElement v1 polyfill in webpack / babel build?
1
Replacing native Promise with bluebird implementation with webpack



All Articles
Loading...
X
Show
Funny
Dev
Pics