@chialab/wds-plugin-polyfill
v0.19.1
Published
Inject polyfills to HTML responses served by the web dev server.
Readme
Wds Plugin Polyfill
Inject polyfills to HTML responses served by the Web Dev Server.
[!CAUTION] Since we are moving away from the RNA cli, we are discontinuing the development of Web Dev Server plugins.
Install
npm i @chialab/wds-plugin-polyfill -Dyarn add @chialab/wds-plugin-polyfill -Dpnpm add @chialab/wds-plugin-polyfill -DUsage
import { polyfillPlugin } from '@chialab/wds-plugin-polyfill';
import { startDevServer } from '@web/dev-server';
await startDevServer({
plugins: [
polyfillPlugin({
minify: true,
features: {
'URL': {},
'URL.prototype.toJSON': {},
'URLSearchParams': {},
'Promise': {},
'Promise.prototype.finally': {},
'fetch': {},
},
}),
],
});It uses the polyfill.io library under the hoods.
License
Wds Plugin Polyfill is released under the MIT license.
