mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-11 04:22:13 +00:00
[cli][node] Re-apply @TooTallNate's vc dev updates (#4254)
This reverts commit 099bc6dbf6 (#4231).
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import { basename, extname, join } from 'path';
|
||||
import { BuilderParams, BuildResult, ShouldServeParams } from './types';
|
||||
import {
|
||||
FileFsRef,
|
||||
BuildOptions,
|
||||
ShouldServeOptions,
|
||||
} from '@vercel/build-utils';
|
||||
import { BuildResult } from './types';
|
||||
|
||||
export const version = 2;
|
||||
|
||||
@@ -7,7 +12,7 @@ export function build({
|
||||
files,
|
||||
entrypoint,
|
||||
config,
|
||||
}: BuilderParams): BuildResult {
|
||||
}: BuildOptions): BuildResult {
|
||||
let path = entrypoint;
|
||||
const outputDir = config.zeroConfig ? config.outputDirectory : '';
|
||||
const outputMatch = outputDir + '/';
|
||||
@@ -16,7 +21,7 @@ export function build({
|
||||
path = path.slice(outputMatch.length);
|
||||
}
|
||||
const output = {
|
||||
[path]: files[entrypoint],
|
||||
[path]: files[entrypoint] as FileFsRef,
|
||||
};
|
||||
const watch = [path];
|
||||
|
||||
@@ -28,7 +33,7 @@ export function shouldServe({
|
||||
files,
|
||||
requestPath,
|
||||
config = {},
|
||||
}: ShouldServeParams) {
|
||||
}: ShouldServeOptions) {
|
||||
let outputPrefix = '';
|
||||
const outputDir = config.zeroConfig ? config.outputDirectory : '';
|
||||
const outputMatch = outputDir + '/';
|
||||
|
||||
Reference in New Issue
Block a user