From 01cbeec9b26a05920324ffcf9a2d9b45458a4689 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Mon, 13 May 2024 15:00:52 +0200 Subject: [PATCH] Update the babel config As suggested by the Discord --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 60b601150..cede92c8a 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,11 @@ 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 }, },