Skip to content

modernweb-dev/dev-server-polyfill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dev server polyfill

Plugin to load polyfills during development. Uses @web/polyfills-loader internally.

Usage

web-dev-server.config.js:

import { polyfill } from '@web/dev-server-polyfill';

export default {
  plugins: [
    polyfill({
      scopedCustomElementRegistry: true,
    }),
  ],
};

You can find the supported polyfills here.

You can also provide custom polyfills:

web-dev-server.config.js:

import { polyfill } from '@web/dev-server-polyfill';

export default {
  plugins: [
    polyfill({
      custom: [
        {
          name: 'my-feature-polyfill',
          path: 'path/to/my/polyfill.js',
          test: "!('myFeature' in window)",
        },
      ],
    }),
  ],
};

You can find the configuration options for providing custom polyfills here.

About

Dev server plugin for loading polyfills

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published