Temporarily revert @TooTallNate's now dev updates (#4231)

Needs more time for testing, and we are preparing a new stable release.

This will be un-reverted after the stable release is tagged.
This commit is contained in:
Nathan Rajlich
2020-05-01 17:52:21 -07:00
committed by GitHub
parent fe0d762aca
commit 099bc6dbf6
31 changed files with 553 additions and 7007 deletions

View File

@@ -1,6 +1,5 @@
import { basename, extname, join } from 'path';
import { FileFsRef, BuildOptions, ShouldServeOptions } from '@now/build-utils';
import { BuildResult } from './types';
import { BuilderParams, BuildResult, ShouldServeParams } from './types';
export const version = 2;
@@ -8,7 +7,7 @@ export function build({
files,
entrypoint,
config,
}: BuildOptions): BuildResult {
}: BuilderParams): BuildResult {
let path = entrypoint;
const outputDir = config.zeroConfig ? config.outputDirectory : '';
const outputMatch = outputDir + '/';
@@ -17,7 +16,7 @@ export function build({
path = path.slice(outputMatch.length);
}
const output = {
[path]: files[entrypoint] as FileFsRef,
[path]: files[entrypoint],
};
const watch = [path];
@@ -29,7 +28,7 @@ export function shouldServe({
files,
requestPath,
config = {},
}: ShouldServeOptions) {
}: ShouldServeParams) {
let outputPrefix = '';
const outputDir = config.zeroConfig ? config.outputDirectory : '';
const outputMatch = outputDir + '/';