| | |
| | | '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 |
| | |
| | | }) |
| | | .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')); |