1. @sucrase/webpack-object-rest-spread-plugin
Webpack plugin to enable object rest/spread syntax
@sucrase/webpack-object-rest-spread-plugin
Package: @sucrase/webpack-object-rest-spread-plugin
Created by: alangpierce
Last modified: Thu, 07 Apr 2022 03:12:00 GMT
Version: 1.0.1
License: MIT
Downloads: 537
Repository: https://github.com/alangpierce/sucrase/tree/master/integrations/webpack-object-rest-spread-plugin

Install

npm install @sucrase/webpack-object-rest-spread-plugin
yarn add @sucrase/webpack-object-rest-spread-plugin

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(),
  ],
}

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code