Skip to content

Commit

Permalink
Fix watch for jsx files
Browse files Browse the repository at this point in the history
  • Loading branch information
camden11 committed Jan 9, 2025
1 parent e715a71 commit f2280d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/projects/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import chalk from 'chalk';
import PQueue from 'p-queue';
import { logger } from '@hubspot/local-dev-lib/logger';
import { isAllowedExtension } from '@hubspot/local-dev-lib/path';
import { JSR_ALLOWED_EXTENSIONS } from '@hubspot/local-dev-lib/constants/extensions';
import { shouldIgnoreFile } from '@hubspot/local-dev-lib/ignoreRules';
import {
cancelStagedBuild,
Expand Down Expand Up @@ -132,7 +133,10 @@ async function queueFileOrFolder(
remotePath: string,
action: string
): Promise<void> {
if (action === 'upload' && !isAllowedExtension(filePath)) {
if (
action === 'upload' &&
!isAllowedExtension(filePath, Array.from(JSR_ALLOWED_EXTENSIONS))
) {
logger.debug(i18n(`${i18nKey}.debug.extensionNotAllowed`, { filePath }));
return;
}
Expand Down

0 comments on commit f2280d9

Please sign in to comment.