1. @webpack-blocks/babel
Webpack block for babel 6+.
@webpack-blocks/babel
Package: @webpack-blocks/babel
Created by: andywer
Last modified: Mon, 13 Jun 2022 01:37:34 GMT
Version: 2.1.0
License: MIT
Downloads: 1,159
Repository: https://github.com/andywer/webpack-blocks

Install

npm install @webpack-blocks/babel
yarn add @webpack-blocks/babel

webpack-blocks - Babel 6+

Gitter chat
NPM Version

This is the babel block providing Babel (Version 7+) configuration using the
babel-loader.

Installation

 npm install --save-dev babel-core @webpack-blocks/babel
# or
yarn add --dev babel-core @webpack-blocks/babel

Usage

 const { createConfig, match } = require('@webpack-blocks/webpack')
const babel = require('@webpack-blocks/babel')

module.exports = createConfig([
  match(['*.js', '!*node_modules*'], [
    babel(/* options */)
  ])
])

You can also use the babel block without match(). It will by default match *.js and *.jsx
files while excluding everything in node_modules/.

Options

cacheDirectory (optional)

Uses a cache directory if set to true. Defaults to true.

plugins (optional)

Array of Babel plugins to use. Babel will read them from .babelrc or package.json if omitted.

presets (optional)

Array of Babel presets to use. Babel will read them from .babelrc or package.json if omitted.

webpack-blocks

Check out the

👉 Main documentation

Released under the terms of the MIT license.

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