Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Aug 28, 2024
1 parent 1b9fcf1 commit 6f99817
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/addon-dev/src/rollup-hbs-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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;
}
Expand Down

0 comments on commit 6f99817

Please sign in to comment.