From 6f998175ebe4b61e124d0ceae0d0f809196be861 Mon Sep 17 00:00:00 2001 From: patrick Date: Wed, 28 Aug 2024 13:25:15 +0200 Subject: [PATCH] revert --- packages/addon-dev/src/rollup-hbs-plugin.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/addon-dev/src/rollup-hbs-plugin.ts b/packages/addon-dev/src/rollup-hbs-plugin.ts index 9d99d1867..a0841511b 100644 --- a/packages/addon-dev/src/rollup-hbs-plugin.ts +++ b/packages/addon-dev/src/rollup-hbs-plugin.ts @@ -63,7 +63,6 @@ export default function rollupHbsPlugin({ let syntheticId = needsSyntheticComponentJS(source, resolution.id); if (syntheticId) { this.addWatchFile(source); - this.addWatchFile(syntheticId); return { id: syntheticId, meta: { @@ -85,6 +84,13 @@ export default function rollupHbsPlugin({ }, transform(code: string, id: string) { + let hbsFilename = id.replace(/\.\w{1,3}$/, '') + '.hbs'; + if (hbsFilename !== id) { + this.addWatchFile(hbsFilename); + if (getMeta(this, id)?.type === 'template-only-component-js') { + this.addWatchFile(id); + } + } if (!hbsFilter(id)) { return null; }