New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-preset-r29

Package Overview
Dependencies
Maintainers
5
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-r29

Babel preset for Refinery29

1.1.0
Source
npm
Version published
Maintainers
5
Created
Source

babel-preset-r29

A Babel preset for Refinery29

Install

npm install --save-dev babel-preset-r29

Usage

.babelrc

{
  "presets": ["r29"]
}

Via CLI

$ babel script.js --presets r29

Via Node API

require("babel-core").transform("code", {
  presets: ["r29"]
});

Supported options

modules

"amd" | "umd" | "systemjs" | "commonjs" | false, defaults to "commonjs".

Enable transformation of ES6 module syntax to another module type.

Setting this to false will not transform modules. Use this for Webpack 2, since Webpack 2's tree-shaking works best if you don't transform import/export statements.

Example of a Webpack config where this is the case:

{
  test: /\.js$/,
  use: {
    loader: 'babel-loader',
    options: {
      presets: [
        ['r29', { modules: false }],
      ],
      plugins: []
    }
  },
  exclude: /node_modules/
}

Keywords

babel

FAQs

Package last updated on 21 Sep 2017

Did you know?

Socket

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