Merge pull request #16953 from dweber019/fix/bundler-fix-windows

fix: use posix for joining paths
This commit is contained in:
Patrik Oldsberg
2023-03-20 11:09:39 +01:00
committed by GitHub
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Fixed backend start command on Windows by removing the use of platform dependent path joins.
+2 -2
View File
@@ -15,7 +15,7 @@
*/
import fs from 'fs-extra';
import { resolve as resolvePath, join as joinPath } from 'path';
import { resolve as resolvePath, posix as posixPath } from 'path';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import ModuleScopePlugin from 'react-dev-utils/ModuleScopePlugin';
@@ -236,7 +236,7 @@ export async function createBackendConfig(
const { packages } = await getPackages(cliPaths.targetDir);
const localPackageEntryPoints = packages.flatMap(p => {
const entryPoints = readEntryPoints((p as ExtendedPackage).packageJson);
return entryPoints.map(e => joinPath(p.packageJson.name, e.mount));
return entryPoints.map(e => posixPath.join(p.packageJson.name, e.mount));
});
const moduleDirs = packages.map(p => resolvePath(p.dir, 'node_modules'));
// See frontend config