Build: Add platform: "node" (#12375)
This commit is contained in:
1 parent
3deb7dca67
commit
e949a54e59
3 files changed
+2
-4
No files matched your search
@@ -101,7 +101,6 @@
|
||||
"babel-jest": "27.5.1",
|
||||
"benchmark": "2.1.4",
|
||||
"browserslist-to-esbuild": "1.1.1",
|
||||
"builtin-modules": "3.2.0",
|
||||
"core-js": "3.21.1",
|
||||
"cross-env": "7.0.3",
|
||||
"cspell": "5.18.5",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import createEsmUtils from "esm-utils";
|
||||
import builtinModules from "builtin-modules";
|
||||
import * as babel from "@babel/core";
|
||||
import esbuild from "esbuild";
|
||||
import { NodeModulesPolyfillPlugin as esbuildPluginNodeModulePolyfills } from "@esbuild-plugins/node-modules-polyfill";
|
||||
@@ -196,8 +195,8 @@ function* getEsbuildOptions(bundle, buildOptions) {
|
||||
};
|
||||
}
|
||||
} else {
|
||||
esbuildOptions.platform = "node";
|
||||
esbuildOptions.external.push(
|
||||
...builtinModules,
|
||||
...bundles
|
||||
.filter((item) => item.input !== bundle.input)
|
||||
.map((item) => `./${item.output}`)
|
||||
|
||||
@@ -2123,7 +2123,7 @@ buffer-from@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
|
||||
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
|
||||
|
||||
builtin-modules@3.2.0, builtin-modules@^3.0.0:
|
||||
builtin-modules@^3.0.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887"
|
||||
integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==
|
||||
|
||||
Reference in new issue
Block a user