diff --git a/packages/addon-dev/src/rollup-hbs-plugin.ts b/packages/addon-dev/src/rollup-hbs-plugin.ts index f97952db7..160ccdf1f 100644 --- a/packages/addon-dev/src/rollup-hbs-plugin.ts +++ b/packages/addon-dev/src/rollup-hbs-plugin.ts @@ -68,6 +68,13 @@ 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'); @@ -75,12 +82,13 @@ export default function rollupHbsPlugin(): Plugin { return { external: false, id: toPath, - // skipSelf: true, }; } TEMPLATE_ONLY_COMPONENTS.add(toPath); + console.log(toPath) + this.emitFile({ type: 'chunk', id: toPath, @@ -91,7 +99,6 @@ export default function rollupHbsPlugin(): Plugin { return { external: false, id: toPath, - // skipSelf: true, }; }