next-with-polyfill
v0.1.5
Published
Import polyfills in your Next.js project
Downloads
113
Readme
next-with-polyfill
Import polyfills in your Next.js project
Usage
Install
Use npm:
npm i next-with-polyfill -S
Or use yarn:
yarn add next-with-polyfill
Config
Normal Config
in next.config.js
const withPlugins = require('next-compose-plugins');
const withPolyfill = require('next-with-polyfill');
module.exports = withPlugins([
withPolyfill([
'./node_modules/core-js/stable',
'./node_modules/regenerator-runtime/runtime',
]),
]);
Change the Polyfill ChunkName
const withPlugins = require('next-compose-plugins');
const withPolyfill = require('next-with-polyfill');
const {
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS,
} = require('next/dist/next-server/lib/constants.js');
module.exports = withPlugins([
withPolyfill(
[
'./node_modules/core-js/stable',
'./node_modules/regenerator-runtime/runtime',
],
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS,
),
]);
Contribution
DefinitelyTyped only works because of contributions by users like you!
Git Message
Follow the Angular git commit message specification
But, you can ignore the scope