Skip to content

Commit 46f78ab

Browse files
committed
fix(validate): don't validate in watch mode
fixes #1647
1 parent d7bdecc commit 46f78ab

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/compiler/types/validate-package-json.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { getComponentsDtsTypesFilePath, isOutputTargetDistCollection, isOutputTa
44

55

66
export async function validatePackageJson(config: d.Config, compilerCtx: d.CompilerCtx, buildCtx: d.BuildCtx) {
7+
if (config.watch) {
8+
return;
9+
}
710
if (buildCtx.packageJson == null) {
811
return;
912
}
@@ -97,10 +100,6 @@ export function validateModule(config: d.Config, compilerCtx: d.CompilerCtx, bui
97100

98101

99102
export async function validateTypes(config: d.Config, compilerCtx: d.CompilerCtx, buildCtx: d.BuildCtx, outputTarget: d.OutputTargetDistTypes) {
100-
if (config.devMode) {
101-
return;
102-
}
103-
104103
if (typeof buildCtx.packageJson.types !== 'string' || buildCtx.packageJson.types === '') {
105104
const recommendedPath = getRecommendedTypesPath(config, outputTarget);
106105
const msg = `package.json "types" property is required when generating a distribution. It's recommended to set the "types" property to: ${recommendedPath}`;

0 commit comments

Comments
 (0)