@content-collections/core 0.15.4 → 0.15.5
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 +9 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -266,9 +266,16 @@ var match = (id, patterns) => {
|
|
|
266
266
|
|
|
267
267
|
//#endregion
|
|
268
268
|
//#region src/esbuild.ts
|
|
269
|
+
function safeLoadTsConfig(directory) {
|
|
270
|
+
try {
|
|
271
|
+
return directory ? loadTsConfig(directory) : loadTsConfig();
|
|
272
|
+
} catch {
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
269
276
|
function tsconfigResolvePaths(configPath) {
|
|
270
|
-
let tsconfig =
|
|
271
|
-
if (!tsconfig) tsconfig =
|
|
277
|
+
let tsconfig = safeLoadTsConfig(dirname(configPath));
|
|
278
|
+
if (!tsconfig) tsconfig = safeLoadTsConfig();
|
|
272
279
|
return tsconfig?.data?.compilerOptions?.paths || {};
|
|
273
280
|
}
|
|
274
281
|
const NON_NODE_MODULE_RE = /^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/;
|