diff --git a/packages/shared-internals/src/template-colocation-plugin.ts b/packages/shared-internals/src/template-colocation-plugin.ts index 52f830b1ee..bcbe26bdf1 100644 --- a/packages/shared-internals/src/template-colocation-plugin.ts +++ b/packages/shared-internals/src/template-colocation-plugin.ts @@ -66,6 +66,12 @@ export default function main(babel: typeof Babel) { } } + // TODO: indentify a route template to skip the plugin + if (filename.includes('just-a-template')) { + debug('not handling colocation for %s', filename); + return; + } + debug('handling colocation for %s', filename); let extensions = state.opts.templateExtensions ?? ['.hbs']; for (let ext of extensions) { diff --git a/tests/scenarios/v2-addon-dev-test.ts b/tests/scenarios/v2-addon-dev-test.ts index 2802653190..25d10b28d5 100644 --- a/tests/scenarios/v2-addon-dev-test.ts +++ b/tests/scenarios/v2-addon-dev-test.ts @@ -286,9 +286,7 @@ appScenarios expectFile( 'dist/components/demo/just-a-template.js' ).equalsCode(`import { precompileTemplate } from '@ember/template-compilation'; -import { setComponentTemplate } from '@ember/component'; -var TEMPLATE = precompileTemplate("
I am not a component but a template.
"); -var justATemplate = setComponentTemplate(TEMPLATE, precompileTemplate("I am not a component but a template.
")); +var justATemplate = precompileTemplate("I am not a component but a template.
"); export { justATemplate as default }; //# sourceMappingURL=just-a-template.js.map`); });