JavaScript Webpack: ES6 syntax gives Module build failed: SyntaxError: Unexpected token

I'm trying to use an example of fixed-data-table, and bundle it with webpack.

I'm using babel-loader and my code otherwise bundles without issues.

Running webpack points to an error which to my knowledge is a part of ES6 syntax(not ES5) ... The ... , such as here:

render() { var {sortDir, children, ...props} = this.props;

the ...props specifically.

Here's my webpack config:

"use strict";

var webpack = require("webpack");

module.exports = {
    entry: {
        app: './app.js',
        vendor: ["fixed-data-table","react","react-dom","jquery", "bootstrap", "vis", "chart.js"],
    },
    output: { path: "./", filename: 'bundle.js' },

    plugins: [
        new webpack.optimize.CommonsChunkPlugin(/* chunkName= */"vendor", /* filename= */"vendor.bundle.js"),
        new webpack.ProvidePlugin({
            $: "jquery",
            jQuery: "jquery"
        })
    ],

    module: {
        loaders: [
            {
                test: /.js?$/,
                loader: 'babel-loader',
                exclude: /node_modules/,
                query: {
                    presets: ['es2015', 'react']
                }
            }
        ]
    },
};

I'm using es2015 and react as presets and loading with babel-loader. How come it's throwing a syntax error when it's supposed to understand and process ES6 syntax?

Here's my Package.json. Do I need to upgrade some of the versions possibly?

{
  "name": "test",
  "version": "1.0.0",
  "main": "main.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "babel-core": "^6.3.17",
    "babel-loader": "^6.2.0",
    "babel-preset-es2015": "^6.3.13",
    "babel-preset-react": "^6.3.13",
    "babel-runtime": "^6.3.19",
    "webpack": "^1.12.9"
  },
  "dependencies": {
    "bootstrap": "^3.3.7",
    "chart.js": "^2.4.0",
    "fixed-data-table": "^0.6.0",
    "jquery": "^3.1.0",
    "react": "^0.14.3",
    "react-dom": "^0.14.3",
    "vis": "^4.17.0"
  },
  "description": ""
}
Answer:1

I'm new to coding and I replaced some repetitive HTML with JavaScript and now the images, which used to display 4 across, are no longer displaying horizontally. They now display on the left only. I've ...

I'm new to coding and I replaced some repetitive HTML with JavaScript and now the images, which used to display 4 across, are no longer displaying horizontally. They now display on the left only. I've ...

  1. replacing html with jquery
  2. replacing html with javascript
  3. replacing html text with javascript
  4. replacing html tables with divs

How do I find vertices positions of a mesh after I used .fromGeometry(); code? I created a buffergeometry from a geomtery that I used for a mesh. Here is an example. var geom = new THREE.BoxGeometry(...

How do I find vertices positions of a mesh after I used .fromGeometry(); code? I created a buffergeometry from a geomtery that I used for a mesh. Here is an example. var geom = new THREE.BoxGeometry(...

Here is my input <input type="text" class="ChampionInput" list="champions" name="champion[]"`placeholder="Champion" required> And here is my js document.forms["first_form_champions"].oninput ...

Here is my input <input type="text" class="ChampionInput" list="champions" name="champion[]"`placeholder="Champion" required> And here is my js document.forms["first_form_champions"].oninput ...

  1. firefox displays html code instead of page

I'm sending cross-domain ajax request and on another end request.is_ajax() gives False var text = getSelectedText(); text = 'text'; if (text){ var xhttp = new XMLHttpRequest(); xhttp....

I'm sending cross-domain ajax request and on another end request.is_ajax() gives False var text = getSelectedText(); text = 'text'; if (text){ var xhttp = new XMLHttpRequest(); xhttp....

  1. django request is ajax
  2. django request.is_ajax() not working
  3. django request.is_ajax example
  4. django if request is ajax
  5. django check request is ajax
  6. django request ajax post
  7. django check if request is ajax
  8. django request.session ajax
  9. django check ajax
  10. django view check if request is ajax