Skip to content

Commit

Permalink
Merge pull request #492 from appuniversum/fix/babel-plugin-ember-temp…
Browse files Browse the repository at this point in the history
…late-compilation-v2.2.2-support

Resolve some issues with `babel-plugin-ember-template-compilation` v2.2.2+
  • Loading branch information
Windvis authored May 14, 2024
2 parents 635c139 + 8360be7 commit c9a5a4d
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 88 deletions.
2 changes: 1 addition & 1 deletion addon/components/au-icon.gts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getOwner } from '@ember/owner';
import Component from '@glimmer/component';
import { type ComponentLike } from '@glint/template';
import type { ComponentLike } from '@glint/template';

export interface AuIconSignature {
Args: {
Expand Down
13 changes: 12 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ module.exports = {
options: {
babel: {
// This is needed for dynamic imports to work: https://github.com/ef4/ember-auto-import#installing-ember-auto-import-in-an-addon
plugins: [require.resolve('ember-auto-import/babel-plugin')],
plugins: [
require.resolve('ember-auto-import/babel-plugin'),
// Copied from the v2 addon blueprint: https://github.com/embroider-build/addon-blueprint/blob/eef35575e7130ffe3b588ecd83c637f35fa56220/files/__addonLocation__/babel.config.json#L3
[
'@babel/plugin-transform-typescript',
{
allExtensions: true,
onlyRemoveTypeImports: true,
allowDeclareFields: true,
},
],
],
},
'ember-cli-babel': { enableTypeScriptTransform: true },
},
Expand Down
Loading

0 comments on commit c9a5a4d

Please sign in to comment.