Skip to content

Commit

Permalink
This feels like a better direction, but I think I'm accidentally dele…
Browse files Browse the repository at this point in the history
…ting files now
  • Loading branch information
NullVoxPopuli committed Feb 17, 2022
1 parent af712e4 commit 558070d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/addon-dev/src/rollup-hbs-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,27 @@ export default function rollupHbsPlugin(): Plugin {
if (await pathExists(maybeHbs)) {
// Need to double check that there isn't already a backing
// js or ts class
let hasJs = await pathExists(path.join(dir, nameWithoutExt + '.js'));
let hasTs = await pathExists(path.join(dir, nameWithoutExt + '.ts'));

if (hasJs || hasTs) {
return resolution;
}


let toPath = path.join(dir, nameWithoutExt + '.js');

if (TEMPLATE_ONLY_COMPONENTS.has(toPath)) {
return {
external: false,
id: toPath,
// skipSelf: true,
};
}

TEMPLATE_ONLY_COMPONENTS.add(toPath);

console.log(toPath)

this.emitFile({
type: 'chunk',
id: toPath,
Expand All @@ -91,7 +99,6 @@ export default function rollupHbsPlugin(): Plugin {
return {
external: false,
id: toPath,
// skipSelf: true,
};
}

Expand Down

0 comments on commit 558070d

Please sign in to comment.