Skip to content

Commit

Permalink
fix: warn when someone specifies 'files' in a package.json (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Jan 28, 2024
1 parent db51ed3 commit 6c00d71
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,13 @@ export async function build(options: BuildOptions): Promise<void> {
}

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,
Expand Down

0 comments on commit 6c00d71

Please sign in to comment.