Socket
Socket
Sign inDemoInstall

@webpack-blocks/babel

Package Overview
Dependencies
358
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @webpack-blocks/babel

Webpack block for babel 6+.


Version published
Weekly downloads
377
increased by16.36%
Maintainers
2
Install size
2.04 MB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 27 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc