This package has been deprecated

Author message:

This package should be deleted, but NPM doesn't allow that if you have active users. So remove it from your dependencies now before I sell my account to hackers

babel-webpack-plugin
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/babel-webpack-plugin package

0.1.2 • Public • Published

Babel is a compiler for writing next generation JavaScript.

A babel plugin (not a loader) for webpack.

Webpack 2 can handle native ES2015 modules, so there's no need to run babel's es2015 preset on every module before passing it to webpack. Doing so just adds to compile time. In addition, as loaders are updated to return ES2015, you would need to add a babel-loader to the top of the chain for every single filetype.

This plugin runs babel only once per asset, at the end of the compilation process.

Installation

npm install babel-webpack-plugin

Usage

Add BabelPlugin to the list of plugins.

var BabelPlugin = require("babel-webpack-plugin");
 
plugins: [
    new BabelPlugin({
        test: /\.js$/,
        presets: ['es2015'],
        sourceMaps: false,
        compact: false
    })
]

Options

The options above are the default, see all options for babel here.

Readme

Keywords

none

Package Sidebar

Install

npm i babel-webpack-plugin

Homepage

example.com

Weekly Downloads

1,017

Version

0.1.2

License

MIT

Unpacked Size

17.6 kB

Total Files

8

Last publish

Collaborators

  • npm