Skip to content

Uncaught TypeError in development build #18

Description

@RusinovAnton

Hi, I'm using:

"react": "^15.3.0",
"react-chartjs-2": "^1.2.4",
"webpack": "^1.13.1"

and when I try use chart with my wepack dev config like this:

import React from 'react';
import { connect } from 'react-redux';
import { Line } from 'react-chartjs-2';
...
render() {
  return (
      <div>
        { data ? <Line data={this.props.data} options={LINE_CHART_OPTIONS} /> : <Loader/> }
      </div>
  );
}

I get this error everytime

core.controller.js:496 Uncaught TypeError: Can't add property _meta, object is not extensible

But things work just fine when I build app with my production config, where webpack.UglifyJsPlugin added:

var uglifyPlugin =  new webpack.optimize.UglifyJsPlugin({
  compress: {
    sequences: true,
    dead_code: true,
    conditionals: true,
    booleans: true,
    unused: true,
    if_return: true,
    join_vars: true,
    drop_console: true
  },
  mangle: {
    except: ['$super', '$', 'exports', 'require']
  },
  output: {
    comments: false
  }
});

Please let me know if any additional info needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions