mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-05 19:41:57 +08:00
fix: 关闭 vite 告警
This commit is contained in:
parent
a5cde50a22
commit
a627335141
@ -1,4 +1,8 @@
|
||||
import process from 'node:process';
|
||||
|
||||
export default function () {
|
||||
process.env.VITE_CJS_IGNORE_WARNING = 'true';
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
require.resolve('./registerBuilder'),
|
||||
|
@ -2,19 +2,20 @@
|
||||
* @copy 该文件代码大部分出自 umi,有需要请参考:
|
||||
* https://github.com/umijs/umi/blob/master/packages/umi/src/forkedDev.ts
|
||||
*/
|
||||
|
||||
import process from 'node:process';
|
||||
import { chalk, yParser } from '@fesjs/utils';
|
||||
import fesPkg from '../package.json';
|
||||
import { Service } from './serviceWithBuiltIn';
|
||||
import getCwd from './utils/getCwd';
|
||||
import getPkg from './utils/getPkg';
|
||||
import fesPkg from '../package.json';
|
||||
import { hackFesInBuild } from './hackFesInBuild';
|
||||
|
||||
const args = yParser(process.argv.slice(2));
|
||||
|
||||
let closed = false;
|
||||
function onSignal(signal, service) {
|
||||
if (closed) return;
|
||||
if (closed)
|
||||
return;
|
||||
closed = true;
|
||||
|
||||
// 退出时触发插件中的onExit事件
|
||||
@ -48,7 +49,8 @@ function onSignal(signal, service) {
|
||||
process.once('SIGQUIT', () => onSignal('SIGQUIT', service));
|
||||
// kill(15) default
|
||||
process.once('SIGTERM', () => onSignal('SIGTERM', service));
|
||||
} catch (e) {
|
||||
}
|
||||
catch (e) {
|
||||
console.error(chalk.red(e.message));
|
||||
console.error(e.stack);
|
||||
process.exit(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user