Skip to content

Commit c9a5a4d

Browse files
authored
Merge pull request #492 from appuniversum/fix/babel-plugin-ember-template-compilation-v2.2.2-support
Resolve some issues with `babel-plugin-ember-template-compilation` v2.2.2+
2 parents 635c139 + 8360be7 commit c9a5a4d

File tree

5 files changed

+188
-88
lines changed

5 files changed

+188
-88
lines changed

addon/components/au-icon.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getOwner } from '@ember/owner';
22
import Component from '@glimmer/component';
3-
import { type ComponentLike } from '@glint/template';
3+
import type { ComponentLike } from '@glint/template';
44

55
export interface AuIconSignature {
66
Args: {

index.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@ module.exports = {
66
options: {
77
babel: {
88
// This is needed for dynamic imports to work: https://github.com/ef4/ember-auto-import#installing-ember-auto-import-in-an-addon
9-
plugins: [require.resolve('ember-auto-import/babel-plugin')],
9+
plugins: [
10+
require.resolve('ember-auto-import/babel-plugin'),
11+
// Copied from the v2 addon blueprint: https://github.com/embroider-build/addon-blueprint/blob/eef35575e7130ffe3b588ecd83c637f35fa56220/files/__addonLocation__/babel.config.json#L3
12+
[
13+
'@babel/plugin-transform-typescript',
14+
{
15+
allExtensions: true,
16+
onlyRemoveTypeImports: true,
17+
allowDeclareFields: true,
18+
},
19+
],
20+
],
1021
},
1122
'ember-cli-babel': { enableTypeScriptTransform: true },
1223
},

0 commit comments

Comments
 (0)