@vercel/node 5.4.0 → 5.4.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.
- package/dist/index.js +17 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -111916,7 +111916,6 @@ async function readMessage(child) {
|
|
|
111916
111916
|
// src/start-dev-server.ts
|
|
111917
111917
|
var require_3 = (0, import_module3.createRequire)(__filename);
|
|
111918
111918
|
var treeKill = (0, import_util.promisify)(import_tree_kill.default);
|
|
111919
|
-
var tscPath = (0, import_path5.resolve)((0, import_path5.dirname)(require_3.resolve("typescript")), "../bin/tsc");
|
|
111920
111919
|
var startDevServer = async (opts) => {
|
|
111921
111920
|
const { entrypoint, workPath, config, meta = {}, publicDir } = opts;
|
|
111922
111921
|
const entrypointPath = (0, import_path5.join)(workPath, entrypoint);
|
|
@@ -112029,6 +112028,23 @@ var startDevServer = async (opts) => {
|
|
|
112029
112028
|
async function doTypeCheck({ entrypoint, workPath, meta = {} }, projectTsConfig) {
|
|
112030
112029
|
const { devCacheDir = (0, import_path5.join)(workPath, ".vercel", "cache") } = meta;
|
|
112031
112030
|
const entrypointCacheDir = (0, import_path5.join)(devCacheDir, "node", entrypoint);
|
|
112031
|
+
const resolveTypescript = (p) => {
|
|
112032
|
+
try {
|
|
112033
|
+
return require_3.resolve("typescript", {
|
|
112034
|
+
paths: [p]
|
|
112035
|
+
});
|
|
112036
|
+
} catch (_) {
|
|
112037
|
+
return "";
|
|
112038
|
+
}
|
|
112039
|
+
};
|
|
112040
|
+
let compiler = resolveTypescript(workPath);
|
|
112041
|
+
if (!compiler) {
|
|
112042
|
+
compiler = resolveTypescript((0, import_path5.join)(__dirname, ".."));
|
|
112043
|
+
}
|
|
112044
|
+
if (!compiler) {
|
|
112045
|
+
compiler = require_3.resolve("typescript");
|
|
112046
|
+
}
|
|
112047
|
+
const tscPath = (0, import_path5.resolve)((0, import_path5.dirname)(compiler), "../bin/tsc");
|
|
112032
112048
|
const tsconfigName = projectTsConfig ? `tsconfig-with-${(0, import_path5.relative)(workPath, projectTsConfig).replace(
|
|
112033
112049
|
/[\\/.]/g,
|
|
112034
112050
|
"-"
|