From cc102a9e8e7e8c88a9a4d1e80cc498ad51577e58 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 24 Nov 2023 10:43:04 -0500 Subject: [PATCH] fix: warn when someone specifies 'files' in a package.json --- mod.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mod.ts b/mod.ts index 0a3d52d..740ffde 100644 --- a/mod.ts +++ b/mod.ts @@ -499,6 +499,13 @@ export async function build(options: BuildOptions): Promise { } function createPackageJson() { + if (options.package?.files != null) { + warn( + "Specifying `files` for the package.json is not recommended " + + "because it will cause the .npmignore file to not be respected.", + ); + } + const packageJsonObj = getPackageJson({ entryPoints, transformOutput,