title: How to disable Uglify in react build
body: <p>I tried to use Y.js (Yjs) npm package and it works in <code>npm start</code> but not <code>npm run build</code> because Uglify doesn't support ES6. So I downloaded the release of that package and include it directly. But my reactjs <code>npm run build</code> is still complaining about Uglify.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>Creating an optimized production build...
  Failed to compile.
  
  static/js/main.3d2ecf94.js from UglifyJs
  SyntaxError: Unexpected token: name (YArray) [./src/Pages/Collaborative/y-array/y-array.es6:12,0]</code></pre>
  </div>
  </div>
  </p>
  
  <p>and my <code>webpack.config.js</code> looks like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var path = require('path');
  
  module.exports = {
    entry: path.join(__dirname, 'public', 'quickstart.js'),
    output: {
      path: '/',
      filename: 'bundle.js'
    },
    module: {
      loaders: [
        {
          test: /.jsx?$/,
          loader: 'babel-loader',
          exclude: /node_modules/,
          query: {
            presets: ["react", "es2016", "stage-2"]
          }
        },
        { test: /\.css$/, loader: "style-loader!css-loader" }
      ]
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can I disable Uglify in my webpack? Which line determines that it has to Uglify in building process?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "name": "myCoolApps",
    "version": "0.1.0",
    "private": true,
    "devDependencies": {
      "css-loader": "^0.26.1",
      "react-scripts": "0.7.0",
      "webpack": "^1.13.3"
    },
    "dependencies": {
      "ace": "git+https://github.com/ajaxorg/ace.git#master",
      "antd": "^2.7.2",
      "axios": "^0.15.3",
      "card": "^2.2.1",
      "card-react": "^1.2.6",
      "chat-template": "0.0.22",
      "codemirror": "^5.25.0",
      "credit-card-type": "^5.0.1",
      "css-loader": "^0.26.1",
      "d3": "^4.7.4",
      "firechat": "^3.0.1",
      "firepad": "^1.4.0",
      "flux": "^3.1.0",
      "gulp": "^3.9.1",
      "gulp-sass": "^3.1.0",
      "history": "^1.17.0",
      "little-loader": "^0.2.0",
      "lodash": "^4.17.4",
      "material-ui": "^0.16.6",
      "moment": "^2.17.1",
      "node-sass": "^4.5.0",
      "quill": "^1.2.3",
      "rc-calendar": "^7.6.5",
      "react": "^15.5.4",
      "react-autosuggest": "^7.0.1",
      "react-cookie": "^1.0.4",
      "react-credit-card": "^0.20.0",
      "react-dom": "^15.5.4",
      "react-dropzone": "^3.8.0",
      "react-event-timeline": "^1.2.2",
      "react-infinite": "^0.10.0",
      "react-infinite-scroller": "^1.0.7",
      "react-list": "^0.8.3",
      "react-notification-system": "^0.2.12",
      "react-router": "^3.0.0",
      "react-tap-event-plugin": "^2.0.1",
      "seedrandom": "^2.4.2",
      "simplewebrtc": "^2.2.2",
      "style-loader": "^0.13.1",
      "superagent": "^3.3.1",
      "y-array": "^10.0.6",
      "y-indexeddb": "^8.1.9",
      "y-leveldb": "0.0.1",
      "y-map": "^10.0.5",
      "y-memory": "^8.0.8",
      "y-richtext": "^9.0.8",
      "y-text": "^9.3.2",
      "y-webrtc": "^8.0.7",
      "y-websockets-client": "^8.0.15",
      "yjs": "^12.1.7"
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test --env=jsdom",
      "eject": "react-scripts eject"
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Actually yea I think it uses react-script. Is there anything I can do to alter that?</p>