buildWeb: suppress experimental api warnings
This commit is contained in:
parent
9c7b548a9e
commit
845088ec02
3 changed files with 8 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
// TODO: Modularise these plugins since both build scripts use them
|
||||
// TODO: Modularise the plugins since both build scripts use them
|
||||
|
||||
import { execSync } from "child_process";
|
||||
import { createWriteStream, readdirSync, readFileSync } from "fs";
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "node build.mjs",
|
||||
"buildWeb": "node buildWeb.mjs",
|
||||
"buildWeb": "node --require=./scripts/suppressExperimentalWarnings.js buildWeb.mjs",
|
||||
"inject": "node scripts/patcher/install.js",
|
||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
||||
"lint:fix": "pnpm lint --fix",
|
||||
|
|
6
scripts/suppressExperimentalWarnings.js
Normal file
6
scripts/suppressExperimentalWarnings.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
process.emit = (originalEmit => function (name, data) {
|
||||
if (name === "warning" && data?.name === "ExperimentalWarning")
|
||||
return false;
|
||||
|
||||
return originalEmit.apply(process, arguments);
|
||||
})(process.emit);
|
Loading…
Reference in a new issue