Skip to content

unexpected token (rest spread operator) #170

@tusharmath

Description

@tusharmath

Webpack Config

module.exports = {
  entry: './src/public/client.jsx',
  output: {
    path: path.resolve(__dirname, 'public'),
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        exclude: /(node_modules|.cache)/,
        loader: 'babel',
        query: {
          presets: ['react', 'es2015'],
          plugins: ['syntax-decorators']
        }
      }
    ]
  }
}

screen shot 2015-11-29 at 1 10 32 pm

es2015 includes object rest support, then why am I facing this issue?

UPDATE:

It starts working when i add transform-object-rest-spread to plugins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions