@sucrase/webpack-object-rest-spread-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Webpack object rest/spread plugin

npm version MIT License

This is a Webpack plugin that hacks the Webpack parser to allow object rest/spread syntax (e.g. {...a, b: c}) in Webpack 3 and earlier.

Note: This plugin is only necessary when using Webpack 3 or earlier. Webpack 4 natively supports object rest/spread. See https://github.com/webpack/webpack/issues/5548 for troubleshooting tips.

Usage

First install the package as a dev dependency:

yarn add --dev @sucrase/webpack-object-rest-spread-plugin

Then add it as a plugin to your webpack config:

const ObjectRestSpreadPlugin = require('@sucrase/webpack-object-rest-spread-plugin');

...

  plugins: [
    new ObjectRestSpreadPlugin(),
  ],
}

Readme

Keywords

none

Package Sidebar

Install

npm i @sucrase/webpack-object-rest-spread-plugin

Weekly Downloads

44

Version

1.0.1

License

MIT

Unpacked Size

11.1 kB

Total Files

8

Last publish

Collaborators

  • alangpierce