king
2025-05-23 24842b40de5cd60700bf69dfd38a0332f5431e36
scripts/build.js
@@ -1,8 +1,9 @@
'use strict';
// 'use strict';
// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';
process.env.GENERATE_SOURCEMAP = 'false';
// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
@@ -66,6 +67,8 @@
  })
  .then(
    ({ stats, previousFileSizes, warnings }) => {
      // 删除控制台css引用顺序警告信息
      warnings = warnings.filter(warning => !/Conflicting order between/ig.test(warning))
      if (warnings.length) {
        console.log(chalk.yellow('Compiled with warnings.\n'));
        console.log(warnings.join('\n\n'));