gdborton / webpack-parallel-uglify-plugin

A faster uglifyjs plugin.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"size" argument must not be larger than 2147483647

givingwu opened this issue · comments

My Code:

// https://github.com/gdborton/webpack-parallel-uglify-plugin
const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin');
const parallelUglifyPlugin = new ParallelUglifyPlugin({
  // include: /.*\/src\/.*/,
  exclude: /node\/\_modules\/.*/,
  cacheDir: path.resolve(__dirname, './cache'),
  uglifyJS: {
    compress: {
      warnings: false,
      // Disabled because of an issue with Uglify breaking seemingly valid code:
      // https://github.com/facebookincubator/create-react-app/issues/2376
      // Pending further investigation:
      // https://github.com/mishoo/UglifyJS2/issues/2011
      comparisons: false,
    },
    mangle: {
      safari10: true,
    },
    output: {
      comments: false,
      // Turned on because emoji and regex is not minified properly using default
      // https://github.com/facebookincubator/create-react-app/issues/2488
      ascii_only: true,
    }
  }
})

The others webpack plugins that i used for my MPA(Multiple Page Application):

const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter');

The first Error is this:

"size" argument must not be larger than 2147483647

maybe it is useful for it but i am confusing for that javascript-read-large-files-failed)

The second error like following:

`safari10` is not a supported option?

Then i annotate this line and It works.

  • Why?
  • Anything wrong?
  • Is it a bug?
  • What happened?

Thanks!