fix(node) executor bug on Windows (#15368)
This commit is contained in:
parent
a5a64cd5be
commit
a7738caa70
@ -2,6 +2,7 @@ import * as esbuild from 'esbuild';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { join, parse } from 'path';
|
import { join, parse } from 'path';
|
||||||
import {
|
import {
|
||||||
|
normalizePath,
|
||||||
ExecutorContext,
|
ExecutorContext,
|
||||||
joinPathFragments,
|
joinPathFragments,
|
||||||
ProjectGraphProjectNode,
|
ProjectGraphProjectNode,
|
||||||
@ -197,6 +198,8 @@ export function getRegisterFileContent(
|
|||||||
mainFile: string,
|
mainFile: string,
|
||||||
outExtension = '.js'
|
outExtension = '.js'
|
||||||
) {
|
) {
|
||||||
|
mainFile = normalizePath(mainFile);
|
||||||
|
|
||||||
// Sort by longest prefix so imports match the most specific path.
|
// Sort by longest prefix so imports match the most specific path.
|
||||||
const sortedKeys = Object.keys(paths).sort(
|
const sortedKeys = Object.keys(paths).sort(
|
||||||
(a: string, b: string) => getPrefixLength(b) - getPrefixLength(a)
|
(a: string, b: string) => getPrefixLength(b) - getPrefixLength(a)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user