sorrycc / roadhog

🐷 Cli tool for creating react apps, configurable version of create-react-app.
2.72k stars 340 forks source link

roadhog build 卡在91%不动了 #780

Open litongqian opened 6 years ago

litongqian commented 6 years ago

不知道封装的啥玩意,用的着打个包,搞这么深,配置感觉跟屎一样,还这么卡

brickspert commented 6 years ago

@litongqian 你可以提问题,可以提PR。难道做个伸手党,还这么不知廉耻,没素质吗?

chjiyun commented 5 years ago

在服务器上堆内存溢出,直接打崩了,而且index.js 很大,有点不可思议。

leohxj commented 5 years ago

卡在了 uglify 压缩代码的环节上。

自行通过 webpack.config.js 替换 terser 吧。我给个示例:

const TerserPlugin = require('terser-webpack-plugin-legacy');

module.exports = config => {
  if (process.env.NODE_ENV === 'production') {
    // 删除 uglify 压缩,使用 TerserPlugin
    // eslint-disable-next-line
    config.plugins.splice(
      3,
      1,
      new TerserPlugin({
        cache: true,
        parallel: true,
      }),
    );
  }

  return config;
};
rkumar1904 commented 3 years ago

Stuck in the uglify compression code link.

Replace terser with webpack.config.js yourself. I give an example:

const TerserPlugin = require('terser-webpack-plugin-legacy');

module.exports = config => {
  if (process.env.NODE_ENV === 'production') {
    // 删除 uglify 压缩,使用 TerserPlugin
    // eslint-disable-next-line
    config.plugins.splice(
      3,
      1,
      new TerserPlugin({
        cache: true,
        parallel: true,
      }),
    );
  }

  return config;
};

Thank You🙏