@builder/exports-field-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Exports Field webpack plugin

Support package-exports in webpack4.

Install

$ npm install @builder/exports-field-webpack-plugin

Usage

You can use it with webpack chain as:

const ExportsFieldWebpackPlugin = require('@builder/exports-field-webpack-plugin').default;

config.plugin('ExportsFieldWebpackPlugin').use(ExportsFieldWebpackPlugin, [
  {
    conditionNames: ['web'],
  },
]);

it will only load module with web condition path which define in module's package.json exports field.

Appreciation

This plugin is inspired by enhanced-resolve that creates webpack resolver.

Readme

Keywords

none

Package Sidebar

Install

npm i @builder/exports-field-webpack-plugin

Weekly Downloads

51

Version

1.0.0

License

BSD-3-Clause

Unpacked Size

41.6 kB

Total Files

21

Last publish

Collaborators

  • answershuto
  • maoxiaoke
  • solojiang
  • chriscindy
  • rax-publisher
  • sobear
  • clarkxia
  • luhengchang228