Skip to content

Commit f35646f

Browse files
committed
chore: wastch component dirs in development
1 parent 3aa9065 commit f35646f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ import { normaliseFontInput } from './pure'
4343
import { logger } from './runtime/logger'
4444
import { checkLocalChrome, downloadFont, hasResolvableDependency, isUndefinedOrTruthy } from './util'
4545

46+
const IS_MODULE_DEVELOPMENT = import.meta.filename.endsWith('.ts')
47+
4648
export interface ModuleOptions {
4749
/**
4850
* Whether the og:image images should be generated.
@@ -456,7 +458,7 @@ export default defineNuxtModule<ModuleOptions>({
456458
addComponentsDir({
457459
path: resolve('./runtime/app/components/Templates/Community'),
458460
island: true,
459-
// watch: true,
461+
watch: IS_MODULE_DEVELOPMENT,
460462
})
461463
}
462464

@@ -484,6 +486,7 @@ export default defineNuxtModule<ModuleOptions>({
484486
addComponentsDir({
485487
path,
486488
island: true,
489+
watch: IS_MODULE_DEVELOPMENT,
487490
})
488491
}
489492
else if (!defaultComponentDirs.includes(componentDir)) {

0 commit comments

Comments
 (0)