mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-07 12:57:47 +00:00
Update Angular output path discovery (#10678)
This commit is contained in:
5
.changeset/cool-actors-brake.md
Normal file
5
.changeset/cool-actors-brake.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@vercel/frameworks': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
update Angular output path discovery
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { promises } from 'fs';
|
import { existsSync, promises } from 'fs';
|
||||||
|
|
||||||
import { Framework } from './types';
|
import { Framework } from './types';
|
||||||
import { readConfigFile } from './read-config-file';
|
import { readConfigFile } from './read-config-file';
|
||||||
@@ -867,7 +867,11 @@ export const frameworks = [
|
|||||||
|
|
||||||
// If there is only one file in it that is a dir we'll use it as dist dir
|
// If there is only one file in it that is a dir we'll use it as dist dir
|
||||||
if (content.length === 1 && content[0].isDirectory()) {
|
if (content.length === 1 && content[0].isDirectory()) {
|
||||||
return join(base, content[0].name);
|
const potentialOutDir = join(base, content[0].name);
|
||||||
|
const potentialOutDirWithBrowser = join(potentialOutDir, 'browser');
|
||||||
|
return existsSync(potentialOutDirWithBrowser)
|
||||||
|
? potentialOutDirWithBrowser
|
||||||
|
: potentialOutDir;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Error detecting output directory: `, error);
|
console.error(`Error detecting output directory: `, error);
|
||||||
|
|||||||
Reference in New Issue
Block a user