Skip to content
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

Fix for addons using ember-cli-typescript 4x #529

Merged
merged 1 commit into from
Sep 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/compat/src/v1-addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ export default class V1Addon {
}

private needsCustomBabel() {
if (
this.addonInstance.addons.find(
(a: any) =>
a.name === 'ember-cli-typescript' &&
semver.satisfies(semver.coerce(a.pkg.version) || a.pkg.version, '>=4.0.0-alpha.1')
)
) {
// This addon is using ember-cli-typescript 4, which relies on
// ember-cli-babel to add the TypeScript transform Babel plugin.
return true;
}

let babelConfig = this.options.babel as TransformOptions | undefined;
if (babelConfig && babelConfig.plugins && babelConfig.plugins.length > 0) {
// this addon has custom babel plugins, so we need to run them here in
Expand Down