Fix Windows webpack build (#32534)
* Fix develop CD Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove previous fix attempt Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Discard changes to .github/workflows/build.yml --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
+1
-3
@@ -91,7 +91,7 @@ try {
|
|||||||
// Get the root of a node_modules dependency the name of its import
|
// Get the root of a node_modules dependency the name of its import
|
||||||
function getPackageRoot(dep: string, target = "package.json"): string {
|
function getPackageRoot(dep: string, target = "package.json"): string {
|
||||||
const targetPath = import.meta.resolve(`${dep}${target ? "/" + target : ""}`);
|
const targetPath = import.meta.resolve(`${dep}${target ? "/" + target : ""}`);
|
||||||
return path.dirname(targetPath.startsWith("file://") ? targetPath.slice(7) : targetPath);
|
return path.dirname(fileURLToPath(targetPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseOverridesToReplacements(overrides: Record<string, string>): webpack.NormalModuleReplacementPlugin[] {
|
function parseOverridesToReplacements(overrides: Record<string, string>): webpack.NormalModuleReplacementPlugin[] {
|
||||||
@@ -260,8 +260,6 @@ export default (env: string, argv: Record<string, any>): webpack.Configuration =
|
|||||||
"net": false,
|
"net": false,
|
||||||
"tls": false,
|
"tls": false,
|
||||||
"crypto": false,
|
"crypto": false,
|
||||||
"async_hooks": false,
|
|
||||||
"stream": false,
|
|
||||||
|
|
||||||
// Polyfill needed by counterpart
|
// Polyfill needed by counterpart
|
||||||
"util": import.meta.resolve("util/"),
|
"util": import.meta.resolve("util/"),
|
||||||
|
|||||||
Reference in New Issue
Block a user