Skip to content

Commit

Permalink
chore: disable tsx node warning (#12093)
Browse files Browse the repository at this point in the history
  • Loading branch information
fz6m authored Feb 22, 2024
1 parent 2d3fa22 commit 98ee5b1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 244 deletions.
2 changes: 1 addition & 1 deletion packages/plugin-run/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dev": "umi-scripts father dev"
},
"dependencies": {
"tsx": "^3.12.2"
"tsx": "3.12.2"
},
"publishConfig": {
"access": "public"
Expand Down
10 changes: 9 additions & 1 deletion packages/plugin-run/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ export default (api: IApi) => {
'utf-8',
);
const tsxPath = getBinPath();
fork(tsxPath, [absTmpFilePath, ...restArgs], { stdio: 'inherit' });
fork(tsxPath, [absTmpFilePath, ...restArgs], {
stdio: 'inherit',
env: {
...process.env,
// disable `(node:92349) ExperimentalWarning: `--experimental-loader` may be removed in the future;` warning
// more context: https://github.com/umijs/umi/pull/11981
NODE_NO_WARNINGS: '1',
},
});
},
});
};
Expand Down
Loading

0 comments on commit 98ee5b1

Please sign in to comment.