@cypress/webpack-dev-server 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,11 +89,13 @@ async function getAngularCliModules(projectRoot) {
|
|
|
89
89
|
];
|
|
90
90
|
const [{ generateBrowserWebpackConfigFromContext }, { getCommonConfig }, { getStylesConfig }, { logging },] = await Promise.all(angularCLiModules.map(async (dep) => {
|
|
91
91
|
try {
|
|
92
|
-
|
|
92
|
+
let depPath = require.resolve(dep, { paths: [projectRoot] });
|
|
93
93
|
// NOTE: @cypress/webpack-dev-server is a CJS package, but we need to import some ESM files and absolute imports.
|
|
94
94
|
// since import statements in TypeScript will get transpiled down to CommonJS require statements, we want to use tsx to leverage
|
|
95
95
|
// an ESM style import here, which supports CommonJS and ESM.
|
|
96
96
|
const { tsImport } = require('tsx/esm/api');
|
|
97
|
+
// NOTE: on Windows, fully qualified paths (ex: C:\Users\username\project\blah) need to be prefixed with `file://` to be properly resolved.
|
|
98
|
+
depPath = (0, os_1.platform)() === 'win32' ? `file://${(0, exports.toPosix)(depPath)}` : depPath;
|
|
97
99
|
const module = await tsImport(depPath, __filename);
|
|
98
100
|
return module;
|
|
99
101
|
}
|