Skip to content

Don't require compiler when targetFormat='hbs' #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Aug 2, 2023

When using targetFormat:' hbs', there's no reason to require the compiler or compilerPath options because the precise version of the compiler doesn't matter. We can use our own @glimmer/syntax dependency directly, because the output will be broadly compatible.

It's only targetFormat: 'wire' where we require the user provides the ember-version-specific compiler or compilerPath, because then we're going to output the exact wire format for that version.

src/plugin.ts Outdated
@@ -7,7 +7,7 @@ import { JSUtils, ExtendedPluginBuilder } from './js-utils';
import type { EmberTemplateCompiler, PreprocessOptions } from './ember-template-compiler';
import { LegacyModuleName } from './public-types';
import { ScopeLocals } from './scope-locals';
import { getTemplateLocals } from '@glimmer/syntax';
import { getTemplateLocals, preprocess, print } from '@glimmer/syntax';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the key bit.

Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🎉🎉

@ef4 ef4 merged commit 7c112ff into main Aug 3, 2023
@delete-merged-branch delete-merged-branch bot deleted the dont-require-compiler branch August 3, 2023 16:50
@ef4 ef4 added the enhancement New feature or request label Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants