We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d8f2c7 commit aeab029Copy full SHA for aeab029
src/lib/application.ts
@@ -305,8 +305,15 @@ export class Application extends ChildableComponent<
305
306
const supportedFileRegex = this.options.getCompilerOptions().allowJs ? /\.[tj]sx?$/ : /\.tsx?$/;
307
function add(file: string, entryPoint: boolean) {
308
- const fileIsDir = FS.statSync(file).isDirectory();
309
- if (fileIsDir && file.slice(-1) !== '/') {
+ let stats: FS.Stats;
+ try {
310
+ stats = FS.statSync(file);
311
+ } catch {
312
+ // No permission or a symbolic link, do not resolve.
313
+ return;
314
+ }
315
+ const fileIsDir = stats.isDirectory();
316
+ if (fileIsDir && !file.endsWith('/')) {
317
file = `${file}/`;
318
}
319
0 commit comments