1. babel-preset-es2015-webpack
Babel preset for all es2015 plugins except babel-plugin-transform-es2015-modules-commonjs.
babel-preset-es2015-webpack
Package: babel-preset-es2015-webpack
Created by: gajus
Last modified: Mon, 13 Jun 2022 04:06:20 GMT
Version: 6.4.3
License: BSD-3-Clause
Downloads: 3,813
Repository: https://github.com/gajus/babel-preset-es2015-webpack

Install

npm install babel-preset-es2015-webpack
yarn add babel-preset-es2015-webpack

Deprecated

As of Babel version v6.13.0, babel-preset-es2015 supports modules option.

Use preset options to disable transformation of the ES6 module syntax:

 {
    "presets": [
        [
            "es2015",
            {
                "modules": false
            }
        ]
    ]
}

babel-preset-es2015-webpack

NPM version
Travis build status
js-canonical-style

Babel preset for all es2015 plugins except babel-plugin-transform-es2015-modules-commonjs.

This preset is used to enable ES2015 code compilation down to ES5. webpack 2 natively supports ES6 import and export statements. webpack 2 leverages the static structure of the ES6 modules to perform tree shaking.

For an introduction to tree shaking and webpack 2 see Tree-shaking with webpack 2 and Babel 6.

Install

 npm install babel-preset-es2015-webpack --save-dev

Usage

Add to .babelrc:

 {
    "presets": [
        "es2015-webpack"
    ]
}

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin