@monorepo-template/webpack-configure-next-yarn-berry
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Configure Yarn Berry for Next

This package offers a Webpack configuration to support Yarn Berry (Yarn v2 and v3) for Next applicatioons.

Install

yarn add --dev "@monorepo-template/webpack-configure-next-yarn-berry"

Use

If you are not already using a custom Webpack configuration for your Next application, the simplest solution is this:

// next.config.js
import configureYarnBerry from '@monorepo-template/webpack-configure-next-yarn-berry';

export default {
  webpack: configureYarnBerry,
};

If you want to customize your Webpack configuration further, pass the webpack method's parameters to the configureYarnBerry function. This will generate a Webpack config object that you can merge with your custom configuration.

// next.config.js
import configureYarnBerry from '@monorepo-template/webpack-configure-next-yarn-berry';

export default {
  webpack(config, options) {
    return {
      ...configureYarnBerry(config, options),
      custom: 'configuration',
    };
  },
};

Readme

Keywords

none

Package Sidebar

Install

npm i @monorepo-template/webpack-configure-next-yarn-berry

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

12.1 kB

Total Files

12

Last publish

Collaborators

  • charlesstover